Add close method to IO writer protocol (#336)

Add close method to IO writer protocol and update testing BufferWriter
to conform to the protocol

Signed-off-by: Kathryn Baldauf <k_baldauf@apple.com>
This commit is contained in:
Kathryn Baldauf
2025-10-16 14:23:39 -07:00
committed by GitHub
parent 61049408dc
commit fa3c348bfe
2 changed files with 5 additions and 0 deletions
+1
View File
@@ -19,4 +19,5 @@ import Foundation
/// A type that writes the provided Data.
public protocol Writer: Sendable {
func write(_ data: Data) throws
func close() throws
}
+4
View File
@@ -72,6 +72,10 @@ extension IntegrationSuite {
}
self.data.append(data)
}
func close() throws {
return
}
}
final class StdinBuffer: ReaderStream {