stdlib: protocol extensions: de-underscore indexOf()

Swift SVN r28244
This commit is contained in:
Dmitri Hrybenko
2015-05-07 00:30:33 +00:00
parent 25e74d21db
commit f76ca6243e
9 changed files with 22 additions and 21 deletions

View File

@@ -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`