Skip to content

Commit fe03f76

Browse files
committed
std: Add performance warnings to HashMap::get_disjoint_mut
Signed-off-by: xizheyin <[email protected]>
1 parent ae8ab87 commit fe03f76

File tree

1 file changed

+3
-0
lines changed
  • library/std/src/collections/hash

1 file changed

+3
-0
lines changed

Diff for: library/std/src/collections/hash/map.rs

+3
Original file line numberDiff line numberDiff line change
@@ -973,6 +973,9 @@ where
973973
/// Returns an array of length `N` with the results of each query. For soundness, at most one
974974
/// mutable reference will be returned to any value. `None` will be used if the key is missing.
975975
///
976+
/// This method performs a check to ensure there are no duplicate keys, which has time-complexity O(n^2),
977+
/// so be careful when passing many keys.
978+
///
976979
/// # Panics
977980
///
978981
/// Panics if any keys are overlapping.

0 commit comments

Comments
 (0)