Skip to content

Commit ebe69c0

Browse files
committed
avoid MaybeUninit::get_mut where it is not needed
1 parent f4f8b21 commit ebe69c0

File tree

1 file changed

+2
-2
lines changed
  • src/liballoc/collections/btree

1 file changed

+2
-2
lines changed

src/liballoc/collections/btree/node.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -602,7 +602,7 @@ impl<'a, K: 'a, V: 'a, Type> NodeRef<marker::Mut<'a>, K, V, Type> {
602602
} else {
603603
unsafe {
604604
slice::from_raw_parts_mut(
605-
self.as_leaf_mut().keys.get_mut() as *mut [K] as *mut K,
605+
self.as_leaf_mut().keys.as_mut_ptr() as *mut K,
606606
self.len()
607607
)
608608
}
@@ -613,7 +613,7 @@ impl<'a, K: 'a, V: 'a, Type> NodeRef<marker::Mut<'a>, K, V, Type> {
613613
debug_assert!(!self.is_shared_root());
614614
unsafe {
615615
slice::from_raw_parts_mut(
616-
self.as_leaf_mut().vals.get_mut() as *mut [V] as *mut V,
616+
self.as_leaf_mut().vals.as_mut_ptr() as *mut V,
617617
self.len()
618618
)
619619
}

0 commit comments

Comments
 (0)