mirror of
https://github.com/apple/swift.git
synced 2025-12-21 12:14:44 +01:00
stdlib: adopt @warn_unused_result
rdar://20957486 Swift SVN r31048
This commit is contained in:
@@ -37,6 +37,7 @@ extension CollectionType where ${GElement} : Equatable {
|
||||
/// `value` is not found.
|
||||
///
|
||||
/// - Complexity: O(`self.count`).
|
||||
@warn_unused_result
|
||||
public func indexOf(element: ${GElement}) -> Index? {
|
||||
if let result = _customIndexOfEquatableElement(element) {
|
||||
return result
|
||||
@@ -56,6 +57,7 @@ extension CollectionType {
|
||||
/// corresponding value, or `nil` if such value is not found.
|
||||
///
|
||||
/// - Complexity: O(`self.count`).
|
||||
@warn_unused_result
|
||||
public func indexOf(
|
||||
@noescape predicate: (${GElement}) throws -> Bool
|
||||
) rethrows -> Index? {
|
||||
|
||||
Reference in New Issue
Block a user