mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
stdlib: protocol extensions: de-underscore indexOf()
Swift SVN r28244
This commit is contained in:
@@ -34,11 +34,12 @@ public func maxElement<
|
||||
/// `value` is not found.
|
||||
///
|
||||
/// - complexity: O(`count(domain)`)
|
||||
@availability(*, unavailable, message="call the 'indexOf()' method on the collection")
|
||||
public func find<
|
||||
C: CollectionType where C.Generator.Element : Equatable
|
||||
>(domain: C, _ value: C.Generator.Element) -> C.Index? {
|
||||
// FIXME(prext): remove this function when protocol extensions land.
|
||||
return domain._prext_indexOf(value)
|
||||
return domain.indexOf(value)
|
||||
}
|
||||
|
||||
/// Return the lesser of `x` and `y`
|
||||
|
||||
Reference in New Issue
Block a user