Skip to content

Commit 8521f60

Browse files
committed
btree: remove useless drops
1 parent ddaf123 commit 8521f60

File tree

2 files changed

+0
-3
lines changed

2 files changed

+0
-3
lines changed

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

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3257,7 +3257,6 @@ impl<'a, K: Ord, V, A: Allocator + Clone> CursorMutKey<'a, K, V, A> {
32573257
};
32583258

32593259
let handle = edge.insert_recursing(key, value, self.alloc.clone(), |ins| {
3260-
drop(ins.left);
32613260
// SAFETY: The handle to the newly inserted value is always on a
32623261
// leaf node, so adding a new root node doesn't invalidate it.
32633262
let root = unsafe { self.root.reborrow().as_mut().unwrap() };
@@ -3303,7 +3302,6 @@ impl<'a, K: Ord, V, A: Allocator + Clone> CursorMutKey<'a, K, V, A> {
33033302
};
33043303

33053304
let handle = edge.insert_recursing(key, value, self.alloc.clone(), |ins| {
3306-
drop(ins.left);
33073305
// SAFETY: The handle to the newly inserted value is always on a
33083306
// leaf node, so adding a new root node doesn't invalidate it.
33093307
let root = unsafe { self.root.reborrow().as_mut().unwrap() };

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

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -406,7 +406,6 @@ impl<'a, K: Ord, V, A: Allocator + Clone> VacantEntry<'a, K, V, A> {
406406
}
407407
}
408408
Some(handle) => handle.insert_recursing(self.key, value, self.alloc.clone(), |ins| {
409-
drop(ins.left);
410409
// SAFETY: Pushing a new root node doesn't invalidate
411410
// handles to existing nodes.
412411
let map = unsafe { self.dormant_map.reborrow() };

0 commit comments

Comments
 (0)