diff --git a/src/set.rs b/src/set.rs index dbee481f..811f462e 100644 --- a/src/set.rs +++ b/src/set.rs @@ -56,6 +56,11 @@ type Bucket = super::Bucket; /// `0..self.len()`. For example, the method `.get_full` looks up the index for /// a value, and the method `.get_index` looks up the value by index. /// +/// # Complexity +/// +/// Internally, `IndexSet` just holds an [`IndexMap`](IndexMap). Thus the complexity +/// of the two are the same for most methods. +/// /// # Examples /// /// ``` @@ -420,6 +425,8 @@ where } /// Return item index, if it exists in the set + /// + /// Computes in **O(1)** time (average). pub fn get_index_of(&self, value: &Q) -> Option where Q: Hash + Equivalent,