Skip to content

Commit 53e7519

Browse files
Dave AbrahamsDave Abrahams
authored andcommitted
Renaming Streamable => TextOutputStreamable
1 parent 71faa6a commit 53e7519

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

Sources/Basic/OutputByteStream.swift

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ public class OutputByteStream: TextOutputStream {
192192
}
193193

194194
/// Write an arbitrary streamable to the buffer.
195-
public final func write(_ value: Streamable) {
195+
public final func write(_ value: TextOutputStreamable) {
196196
// Get a mutable reference.
197197
var stream: OutputByteStream = self
198198
value.write(to: &stream)
@@ -260,7 +260,7 @@ precedencegroup StreamingPrecedence {
260260
//
261261
// NOTE: It would be nice to use a protocol here and the adopt it by all the
262262
// things we can efficiently stream out. However, that doesn't work because we
263-
// ultimately need to provide a manual overload sometimes, e.g., Streamable, but
263+
// ultimately need to provide a manual overload sometimes, e.g., TextOutputStreamable, but
264264
// that will then cause ambiguous lookup versus the implementation just using
265265
// the defined protocol.
266266

@@ -318,7 +318,7 @@ public func <<<(stream: OutputByteStream, value: ByteStreamable) -> OutputByteSt
318318
}
319319

320320
@discardableResult
321-
public func <<<(stream: OutputByteStream, value: Streamable) -> OutputByteStream {
321+
public func <<<(stream: OutputByteStream, value: TextOutputStreamable) -> OutputByteStream {
322322
stream.write(value)
323323
return stream
324324
}

Tests/BasicTests/OutputByteStreamTests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ class OutputByteStreamTests: XCTestCase {
2222
stream.write([UInt8]("wor".utf8))
2323
stream.write([UInt8]("world".utf8)[3..<5])
2424

25-
let streamable: Streamable = Character("!")
25+
let streamable: TextOutputStreamable = Character("!")
2626
stream.write(streamable)
2727

2828

@@ -34,7 +34,7 @@ class OutputByteStreamTests: XCTestCase {
3434
func testStreamOperator() {
3535
let stream = BufferedOutputByteStream()
3636

37-
let streamable: Streamable = Character("!")
37+
let streamable: TextOutputStreamable = Character("!")
3838
stream <<< "Hello" <<< Character(",") <<< Character(" ") <<< [UInt8]("wor".utf8) <<< [UInt8]("world".utf8)[3..<5] <<< streamable
3939

4040
XCTAssertEqual(stream.position, "Hello, world!".utf8.count)

0 commit comments

Comments
 (0)