Skip to content

Commit

Permalink
Document complexity of get_index_of
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaduo committed May 6, 2021
1 parent 73442d6 commit a5893fe
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -424,6 +424,8 @@ where
}

/// Return item index, if it exists in the map
///
/// Computes in **O(1)** time (average).
pub fn get_index_of<Q: ?Sized>(&self, key: &Q) -> Option<usize>
where
Q: Hash + Equivalent<K>,
Expand Down

0 comments on commit a5893fe

Please sign in to comment.