Skip to content

Commit 9c18764

Browse files
author
Enrico Granata
committed
Code review feedback; String can be directly written to
1 parent 7bd0a9f commit 9c18764

File tree

1 file changed

+1
-14
lines changed

1 file changed

+1
-14
lines changed

stdlib/public/core/PrintForDebugger.swift

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -263,23 +263,10 @@ public enum _PrintForDebugger {
263263
}
264264
}
265265

266-
struct StringOutput: OutputStream {
267-
var data = ""
268-
mutating func _lock() {
269-
}
270-
271-
mutating func _unlock() {
272-
}
273-
274-
mutating func write(_ string: String) {
275-
data += string
276-
}
277-
}
278-
279266
public static func printForDebugger(value: Any) -> String {
280267
var maxItemCounter = Int.max
281268
var refs = Set<ObjectIdentifier>()
282-
var targetStream = StringOutput()
269+
var targetStream = ""
283270

284271
printForDebuggerImpl(
285272
value: value,

0 commit comments

Comments
 (0)