Skip to content

Commit

Permalink
avoid MaybeUninit::get_mut where it is not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
RalfJung committed Dec 2, 2018
1 parent f4f8b21 commit ebe69c0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/liballoc/collections/btree/node.rs
Expand Up @@ -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()
)
}
Expand All @@ -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()
)
}
Expand Down

0 comments on commit ebe69c0

Please sign in to comment.