Skip to content

std: Add performance warnings to HashMap::get_disjoint_mut #139307

New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Merged
merged 2 commits into from
Apr 24, 2025
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions library/std/src/collections/hash/map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -973,6 +973,9 @@ where
/// Returns an array of length `N` with the results of each query. For soundness, at most one
/// mutable reference will be returned to any value. `None` will be used if the key is missing.
///
/// This method performs a check to ensure there are no duplicate keys, which has time-complexity O(n^2),
/// so be careful when passing many keys.
///
/// # Panics
///
/// Panics if any keys are overlapping.
Expand Down
Loading