Skip to content

Commit 277ce9e

Browse files
authored
Rollup merge of #70979 - ssomers:btreemap_the_alice_merton_variations, r=Amanieu
Follow up on BTreeMap comments r? @Amanieu (for the first commit)
2 parents a5e06f2 + de39a4f commit 277ce9e

File tree

2 files changed

+2
-4
lines changed

2 files changed

+2
-4
lines changed

src/liballoc/collections/btree/map.rs

-2
Original file line numberDiff line numberDiff line change
@@ -2771,8 +2771,6 @@ impl<'a, K: 'a, V: 'a> Handle<NodeRef<marker::Mut<'a>, K, V, marker::LeafOrInter
27712771
pos.next_unchecked();
27722772
}
27732773
}
2774-
2775-
// This internal node might be underfull, but only if it's the root.
27762774
break;
27772775
}
27782776
}

src/liballoc/collections/btree/node.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ impl<K, V> Root<K, V> {
161161
NodeRef {
162162
height: self.height,
163163
node: self.node.as_ptr(),
164-
root: self as *const _ as *mut _,
164+
root: ptr::null(),
165165
_marker: PhantomData,
166166
}
167167
}
@@ -179,7 +179,7 @@ impl<K, V> Root<K, V> {
179179
NodeRef {
180180
height: self.height,
181181
node: self.node.as_ptr(),
182-
root: ptr::null_mut(), // FIXME: Is there anything better to do here?
182+
root: ptr::null(),
183183
_marker: PhantomData,
184184
}
185185
}

0 commit comments

Comments
 (0)