Skip to content

Commit 69c57cf

Browse files
committed
address RalfJung's comment
1 parent 0f28009 commit 69c57cf

File tree

1 file changed

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

1 file changed

+6
-6
lines changed

src/liballoc/collections/btree/node.rs

+6-6
Original file line numberDiff line numberDiff line change
@@ -567,7 +567,7 @@ impl<'a, K: 'a, V: 'a, Type> NodeRef<marker::Immut<'a>, K, V, Type> {
567567
// the node, which is allowed by LLVM.
568568
unsafe {
569569
slice::from_raw_parts(
570-
self.as_leaf().keys.get_ref().as_ptr(),
570+
self.as_leaf().keys.as_ptr() as *const K,
571571
self.len()
572572
)
573573
}
@@ -578,7 +578,7 @@ impl<'a, K: 'a, V: 'a, Type> NodeRef<marker::Immut<'a>, K, V, Type> {
578578
debug_assert!(!self.is_shared_root());
579579
unsafe {
580580
slice::from_raw_parts(
581-
self.as_leaf().vals.get_ref().as_ptr(),
581+
self.as_leaf().vals.as_ptr() as *const V,
582582
self.len()
583583
)
584584
}
@@ -1152,12 +1152,12 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Leaf>, marker::KV>
11521152

11531153
ptr::copy_nonoverlapping(
11541154
self.node.keys().as_ptr().add(self.idx + 1),
1155-
new_node.keys.get_mut().as_mut_ptr(),
1155+
new_node.keys.as_mut_ptr() as *mut K,
11561156
new_len
11571157
);
11581158
ptr::copy_nonoverlapping(
11591159
self.node.vals().as_ptr().add(self.idx + 1),
1160-
new_node.vals.get_mut().as_mut_ptr(),
1160+
new_node.vals.as_mut_ptr() as *mut V,
11611161
new_len
11621162
);
11631163

@@ -1210,12 +1210,12 @@ impl<'a, K, V> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>, marker::
12101210

12111211
ptr::copy_nonoverlapping(
12121212
self.node.keys().as_ptr().add(self.idx + 1),
1213-
new_node.data.keys.get_mut().as_mut_ptr(),
1213+
new_node.data.keys.as_mut_ptr() as *mut K,
12141214
new_len
12151215
);
12161216
ptr::copy_nonoverlapping(
12171217
self.node.vals().as_ptr().add(self.idx + 1),
1218-
new_node.data.vals.get_mut().as_mut_ptr(),
1218+
new_node.data.vals.as_mut_ptr() as *mut V,
12191219
new_len
12201220
);
12211221
ptr::copy_nonoverlapping(

0 commit comments

Comments
 (0)