Skip to content

Commit

Permalink
Merge pull request #187 from Kaduo/complexity-in-docs
Browse files Browse the repository at this point in the history
Document average time complexity of ```get_index_of()``` method
  • Loading branch information
bluss authored May 6, 2021
2 parents 73442d6 + a5893fe commit cdccb8b
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 cdccb8b

Please sign in to comment.