From a5893fedd3fe67dee5908da7b2fa237f64e821a8 Mon Sep 17 00:00:00 2001 From: Balthazar Potet Date: Thu, 6 May 2021 16:39:07 +0200 Subject: [PATCH] Document complexity of get_index_of --- src/map.rs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/map.rs b/src/map.rs index 128cf9da..a482a399 100644 --- a/src/map.rs +++ b/src/map.rs @@ -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(&self, key: &Q) -> Option where Q: Hash + Equivalent,