Skip to content

Commit cdccb8b

Browse files
authored
Merge pull request #187 from Kaduo/complexity-in-docs
Document average time complexity of ```get_index_of()``` method
2 parents 73442d6 + a5893fe commit cdccb8b

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)