mirror of
https://github.com/apple/container.git
synced 2026-09-12 02:35:42 +00:00
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:
@@ -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
|
||||
}
|
||||
|
||||
@@ -72,6 +72,10 @@ extension IntegrationSuite {
|
||||
}
|
||||
self.data.append(data)
|
||||
}
|
||||
|
||||
func close() throws {
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
final class StdinBuffer: ReaderStream {
|
||||
|
||||
Reference in New Issue
Block a user