Skip to content

Commit a5893fe

Browse files
committed
Document complexity of get_index_of
1 parent 73442d6 commit a5893fe

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/map.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -424,6 +424,8 @@ where
424424
}
425425

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

0 commit comments

Comments
 (0)