@@ -484,15 +484,15 @@ impl<'a, K, V, Type> NodeRef<marker::Mut<'a>, K, V, Type> {
484
484
///
485
485
/// # Safety
486
486
/// The node has more than `idx` initialized elements.
487
- pub unsafe fn key_mut_at ( & mut self , idx : usize ) -> & mut K {
487
+ unsafe fn key_mut_at ( & mut self , idx : usize ) -> & mut K {
488
488
unsafe { self . reborrow_mut ( ) . into_key_mut_at ( idx) }
489
489
}
490
490
491
491
/// Borrows a mutable reference to one of the values stored in the node.
492
492
///
493
493
/// # Safety
494
494
/// The node has more than `idx` initialized elements.
495
- pub unsafe fn val_mut_at ( & mut self , idx : usize ) -> & mut V {
495
+ unsafe fn val_mut_at ( & mut self , idx : usize ) -> & mut V {
496
496
unsafe { self . reborrow_mut ( ) . into_val_mut_at ( idx) }
497
497
}
498
498
@@ -655,7 +655,7 @@ impl<'a, K: 'a, V: 'a> NodeRef<marker::Mut<'a>, K, V, marker::Internal> {
655
655
656
656
/// Adds a key/value pair, and an edge to go to the left of that pair,
657
657
/// to the beginning of the node.
658
- pub fn push_front ( & mut self , key : K , val : V , edge : Root < K , V > ) {
658
+ fn push_front ( & mut self , key : K , val : V , edge : Root < K , V > ) {
659
659
assert ! ( edge. height == self . height - 1 ) ;
660
660
assert ! ( self . len( ) < CAPACITY ) ;
661
661
@@ -1011,18 +1011,18 @@ impl<'a, K: 'a, V: 'a> Handle<NodeRef<marker::Mut<'a>, K, V, marker::Internal>,
1011
1011
let ( middle_kv_idx, insertion) = splitpoint ( self . idx ) ;
1012
1012
let middle = unsafe { Handle :: new_kv ( self . node , middle_kv_idx) } ;
1013
1013
let ( mut left, k, v, mut right) = middle. split ( ) ;
1014
- match insertion {
1014
+ let mut insertion_edge = match insertion {
1015
1015
InsertionPlace :: Left ( insert_idx) => unsafe {
1016
- Handle :: new_edge ( left. reborrow_mut ( ) , insert_idx) . insert_fit ( key , val , edge ) ;
1016
+ Handle :: new_edge ( left. reborrow_mut ( ) , insert_idx)
1017
1017
} ,
1018
1018
InsertionPlace :: Right ( insert_idx) => unsafe {
1019
1019
Handle :: new_edge (
1020
1020
right. node_as_mut ( ) . cast_unchecked :: < marker:: Internal > ( ) ,
1021
1021
insert_idx,
1022
1022
)
1023
- . insert_fit ( key, val, edge) ;
1024
1023
} ,
1025
- }
1024
+ } ;
1025
+ insertion_edge. insert_fit ( key, val, edge) ;
1026
1026
InsertResult :: Split ( SplitResult { left : left. forget_type ( ) , k, v, right } )
1027
1027
}
1028
1028
}
0 commit comments