Skip to content

Commit da3f51f

Browse files
author
Russ Bishop
committed
Fix LoggingWrappers
1 parent 6fd60c6 commit da3f51f

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

stdlib/private/StdlibCollectionUnittest/LoggingWrappers.swift.gyb

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -81,7 +81,7 @@ public class SequenceLog {
8181
public static var map = TypeIndexed(0)
8282
public static var filter = TypeIndexed(0)
8383
public static var forEach = TypeIndexed(0)
84-
public static var find = TypeIndexed(0)
84+
public static var first = TypeIndexed(0)
8585
public static var dropFirst = TypeIndexed(0)
8686
public static var dropLast = TypeIndexed(0)
8787
public static var prefixMaxLength = TypeIndexed(0)
@@ -114,7 +114,6 @@ public class CollectionLog : SequenceLog {
114114
public static var isEmpty = TypeIndexed(0)
115115
public static var count = TypeIndexed(0)
116116
public static var _customIndexOfEquatableElement = TypeIndexed(0)
117-
public static var first = TypeIndexed(0)
118117
public static var advance = TypeIndexed(0)
119118
public static var advanceLimit = TypeIndexed(0)
120119
public static var distance = TypeIndexed(0)
@@ -245,11 +244,11 @@ public struct ${Self}<
245244
try base.forEach(body)
246245
}
247246

248-
public func find(
249-
where predicate: @noescape (Base.Iterator.Element) throws -> Void
247+
public func first(
248+
where predicate: @noescape (Base.Iterator.Element) throws -> Bool
250249
) rethrows -> Base.Iterator.Element? {
251-
Log.find[selfType] += 1
252-
return try base.find(where: predicate)
250+
Log.first[selfType] += 1
251+
return try base.first(where: predicate)
253252
}
254253

255254
public typealias SubSequence = Base.SubSequence

0 commit comments

Comments
 (0)