Skip to content

Commit ed30712

Browse files
authored
Fixes example snippet in OutputStream.swift (#33844)
1 parent d2b70e4 commit ed30712

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

stdlib/public/core/OutputStream.swift

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -225,23 +225,20 @@ public protocol LosslessStringConvertible: CustomStringConvertible {
225225
///
226226
/// let p = Point(x: 21, y: 30)
227227
/// print(String(reflecting: p))
228-
/// // Prints "p: Point = {
229-
/// // x = 21
230-
/// // y = 30
231-
/// // }"
228+
/// // Prints "Point(x: 21, y: 30)"
232229
///
233230
/// After adding `CustomDebugStringConvertible` conformance by implementing the
234231
/// `debugDescription` property, `Point` provides its own custom debugging
235232
/// representation.
236233
///
237234
/// extension Point: CustomDebugStringConvertible {
238235
/// var debugDescription: String {
239-
/// return "Point(x: \(x), y: \(y))"
236+
/// return "(\(x), \(y))"
240237
/// }
241238
/// }
242239
///
243240
/// print(String(reflecting: p))
244-
/// // Prints "Point(x: 21, y: 30)"
241+
/// // Prints "(21, 30)"
245242
public protocol CustomDebugStringConvertible {
246243
/// A textual representation of this instance, suitable for debugging.
247244
///

0 commit comments

Comments
 (0)