Skip to content

Commit c1c211a

Browse files
committed
Fix performance backlash of #74762
1 parent a99ae95 commit c1c211a

File tree

1 file changed

+1
-1
lines changed
  • library/alloc/src/collections/btree

1 file changed

+1
-1
lines changed

library/alloc/src/collections/btree/map.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2669,8 +2669,8 @@ impl<'a, K: Ord, V> OccupiedEntry<'a, K, V> {
26692669
*self.length -= 1;
26702670

26712671
let RemoveResult { old_kv, pos, emptied_internal_root } = self.handle.remove_kv_tracking();
2672-
let root = pos.into_node().into_root_mut();
26732672
if emptied_internal_root {
2673+
let root = pos.into_node().into_root_mut();
26742674
root.pop_internal_level();
26752675
}
26762676
old_kv

0 commit comments

Comments
 (0)