mirror of
https://github.com/rust-lang/rust.git
synced 2026-04-26 13:01:27 +03:00
30837cb66d
Replace `ShardedHashMap` method `insert` with debug-checked `insert_unique` Currently every use of `ShardedHashMap::insert` checks that it won't evict an old value due to unique key. I haven't found any issue related to that faulty condition, so I thought of replacing it with `ShardedHashMap::insert_unique` which doesn't check for this condition unless `debug_assertions` are enabled. This might improve the performance. r? @petrochenkov