Skip to content

Commit

Permalink
stdlib: add complexity docs to Set.removeFirst()
Browse files Browse the repository at this point in the history
  • Loading branch information
gribozavr committed Sep 16, 2016
1 parent 38c5fbf commit 30856bf
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions stdlib/public/core/HashedCollections.swift.gyb
Original file line number Diff line number Diff line change
Expand Up @@ -655,6 +655,9 @@ public struct Set<Element : Hashable> :
/// be the first element that was added to the set. The set must not be
/// empty.
///
/// - Complexity: Amortized O(1) if the set does not wrap a bridged `NSSet`.
/// If the set wraps a bridged `NSSet`, the performance is unspecified.
///
/// - Returns: A member of the set.
@discardableResult
public mutating func removeFirst() -> Element {
Expand Down

0 comments on commit 30856bf

Please sign in to comment.