@@ -474,15 +474,15 @@ impl<'a, K, V, Type> NodeRef<marker::Mut<'a>, K, V, Type> {
474
474
///
475
475
/// # Safety
476
476
/// The node has more than `idx` initialized elements.
477
- pub unsafe fn key_mut_at ( & mut self , idx : usize ) -> & mut K {
477
+ unsafe fn key_mut_at ( & mut self , idx : usize ) -> & mut K {
478
478
unsafe { self . reborrow_mut ( ) . into_key_mut_at ( idx) }
479
479
}
480
480
481
481
/// Borrows a mutable reference to one of the values stored in the node.
482
482
///
483
483
/// # Safety
484
484
/// The node has more than `idx` initialized elements.
485
- pub unsafe fn val_mut_at ( & mut self , idx : usize ) -> & mut V {
485
+ unsafe fn val_mut_at ( & mut self , idx : usize ) -> & mut V {
486
486
unsafe { self . reborrow_mut ( ) . into_val_mut_at ( idx) }
487
487
}
488
488
@@ -645,7 +645,7 @@ impl<'a, K: 'a, V: 'a> NodeRef<marker::Mut<'a>, K, V, marker::Internal> {
645
645
646
646
/// Adds a key/value pair, and an edge to go to the left of that pair,
647
647
/// to the beginning of the node.
648
- pub fn push_front ( & mut self , key : K , val : V , edge : Root < K , V > ) {
648
+ fn push_front ( & mut self , key : K , val : V , edge : Root < K , V > ) {
649
649
assert ! ( edge. height == self . height - 1 ) ;
650
650
assert ! ( self . len( ) < CAPACITY ) ;
651
651
@@ -1001,18 +1001,18 @@ impl<'a, K: 'a, V: 'a> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>,
1001
1001
let ( middle_kv_idx, insertion) = splitpoint ( self . idx ) ;
1002
1002
let middle = unsafe { Handle :: new_kv ( self . node , middle_kv_idx) } ;
1003
1003
let ( mut left, k, v, mut right) = middle. split ( ) ;
1004
- match insertion {
1004
+ let mut insertion_edge = match insertion {
1005
1005
InsertionPlace :: Left ( insert_idx) => unsafe {
1006
- Handle :: new_edge ( left. reborrow_mut ( ) , insert_idx) . insert_fit ( key , val , edge ) ;
1006
+ Handle :: new_edge ( left. reborrow_mut ( ) , insert_idx)
1007
1007
} ,
1008
1008
InsertionPlace :: Right ( insert_idx) => unsafe {
1009
1009
Handle :: new_edge (
1010
1010
right. node_as_mut ( ) . cast_unchecked :: < marker:: Internal > ( ) ,
1011
1011
insert_idx,
1012
1012
)
1013
- . insert_fit ( key, val, edge) ;
1014
1013
} ,
1015
- }
1014
+ } ;
1015
+ insertion_edge. insert_fit ( key, val, edge) ;
1016
1016
InsertResult :: Split ( SplitResult { left : left. forget_type ( ) , k, v, right } )
1017
1017
}
1018
1018
}
0 commit comments