Skip to content

Commit d67c362

Browse files
author
Enrico Granata
committed
Address code review comments
1 parent 9c18764 commit d67c362

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

stdlib/public/core/PrintForDebugger.swift

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,19 +12,19 @@
1212

1313
public enum _PrintForDebugger {
1414

15-
enum CollectionStatus {
15+
internal enum CollectionStatus {
1616
case NotACollection
1717
case CollectionOfElements
1818
case CollectionOfPairs
1919
case Element
2020
case Pair
2121
case ElementOfPair
2222

23-
var isCollection: Bool {
23+
internal var isCollection: Bool {
2424
return self != .NotACollection
2525
}
2626

27-
func getChildStatus(child: Mirror) -> CollectionStatus {
27+
internal func getChildStatus(child: Mirror) -> CollectionStatus {
2828
let disposition = child.displayStyle ?? .struct
2929

3030
if disposition == .collection { return .CollectionOfElements }
@@ -39,23 +39,23 @@ public enum _PrintForDebugger {
3939
}
4040
}
4141

42-
static func asObjectIdentifier(value: Any) -> ObjectIdentifier? {
42+
internal static func asObjectIdentifier(value: Any) -> ObjectIdentifier? {
4343
if let ao = value as? AnyObject {
4444
return ObjectIdentifier(ao)
4545
} else {
4646
return nil
4747
}
4848
}
4949

50-
static func asNumericValue(value: Any) -> Int {
50+
internal static func asNumericValue(value: Any) -> Int {
5151
if let ao = value as? AnyObject {
5252
return unsafeBitCast(ao, to: Int.self)
5353
} else {
5454
return 0
5555
}
5656
}
5757

58-
static func asStringRepresentation(
58+
internal static func asStringRepresentation(
5959
value: Any?,
6060
mirror: Mirror,
6161
count: Int) -> String? {
@@ -113,7 +113,7 @@ public enum _PrintForDebugger {
113113
return nil
114114
}
115115

116-
static func ivarCount(mirror: Mirror) -> Int {
116+
internal static func ivarCount(mirror: Mirror) -> Int {
117117
let count = Int(mirror.children.count)
118118
if let sc = mirror.superclassMirror {
119119
return ivarCount(mirror: sc) + count
@@ -123,7 +123,7 @@ public enum _PrintForDebugger {
123123
}
124124

125125

126-
static func shouldExpand(
126+
internal static func shouldExpand(
127127
mirror: Mirror,
128128
collectionStatus: CollectionStatus,
129129
isRoot: Bool) -> Bool {
@@ -137,7 +137,7 @@ public enum _PrintForDebugger {
137137
}
138138
}
139139

140-
static func printForDebuggerImpl<StreamType: OutputStream>(
140+
internal static func printForDebuggerImpl<StreamType: OutputStream>(
141141
value: Any?,
142142
mirror: Mirror,
143143
name: String?,
@@ -280,7 +280,7 @@ public enum _PrintForDebugger {
280280
maxItemCounter: &maxItemCounter,
281281
targetStream: &targetStream)
282282

283-
return targetStream.data
283+
return targetStream
284284
}
285285
}
286286

0 commit comments

Comments
 (0)