about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorRalf Jung <post@ralfj.de>2018-12-02 12:34:39 +0100
committerRalf Jung <post@ralfj.de>2018-12-02 12:34:39 +0100
commitebe69c06b38e0d1d20c79ee4342715514e917107 (patch)
tree34cac547b170aa46e91d6470660eb58e95ea317a /src/liballoc
parentf4f8b211a8650feff62c69a1dfb5156f692003c3 (diff)
downloadrust-ebe69c06b38e0d1d20c79ee4342715514e917107.tar.gz
rust-ebe69c06b38e0d1d20c79ee4342715514e917107.zip
avoid MaybeUninit::get_mut where it is not needed
Diffstat (limited to 'src/liballoc')
-rw-r--r--src/liballoc/collections/btree/node.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/liballoc/collections/btree/node.rs b/src/liballoc/collections/btree/node.rs
index f9b455fe796..215689dfc48 100644
--- a/src/liballoc/collections/btree/node.rs
+++ b/src/liballoc/collections/btree/node.rs
@@ -602,7 +602,7 @@ impl<'a, K: 'a, V: 'a, Type> NodeRef<marker::Mut<'a>, K, V, Type> {
         } else {
             unsafe {
                 slice::from_raw_parts_mut(
-                    self.as_leaf_mut().keys.get_mut() as *mut [K] as *mut K,
+                    self.as_leaf_mut().keys.as_mut_ptr() as *mut K,
                     self.len()
                 )
             }
@@ -613,7 +613,7 @@ impl<'a, K: 'a, V: 'a, Type> NodeRef<marker::Mut<'a>, K, V, Type> {
         debug_assert!(!self.is_shared_root());
         unsafe {
             slice::from_raw_parts_mut(
-                self.as_leaf_mut().vals.get_mut() as *mut [V] as *mut V,
+                self.as_leaf_mut().vals.as_mut_ptr() as *mut V,
                 self.len()
             )
         }