Rollup merge of #77399 - ssomers:btree_cleanup_5, r=Mark-Simulacrum
BTreeMap: use Unique::from to avoid a cast where type information exists r? @Mark-Simulacrum
This commit is contained in:
commit
c820a522ca
@ -128,7 +128,7 @@ impl<K, V> BoxedNode<K, V> {
|
||||
}
|
||||
|
||||
fn from_internal(node: Box<InternalNode<K, V>>) -> Self {
|
||||
BoxedNode { ptr: Box::into_unique(node).cast() }
|
||||
BoxedNode { ptr: Unique::from(&mut Box::leak(node).data) }
|
||||
}
|
||||
|
||||
unsafe fn from_ptr(ptr: NonNull<LeafNode<K, V>>) -> Self {
|
||||
|
Loading…
Reference in New Issue
Block a user