@@ -1437,7 +1437,7 @@ impl Inner {
14371437 } ;
14381438
14391439 let total_node_storage_size = size_of :: < Header > ( )
1440- + hi. map ( |hi| hi . len ( ) ) . unwrap_or ( 0 )
1440+ + hi. map ( |h| h . len ( ) ) . unwrap_or ( 0 )
14411441 + lo. len ( )
14421442 + key_storage_size
14431443 + value_storage_size
@@ -1454,7 +1454,7 @@ impl Inner {
14541454 header. fixed_key_length = fixed_key_length;
14551455 header. fixed_value_length = fixed_value_length;
14561456 header. lo_len = lo. len ( ) as u64 ;
1457- header. hi_len = hi. map ( |hi| hi . len ( ) as u64 ) . unwrap_or ( 0 ) ;
1457+ header. hi_len = hi. map ( |h| h . len ( ) as u64 ) . unwrap_or ( 0 ) ;
14581458 header. fixed_key_stride = fixed_key_stride;
14591459 header. offset_bytes = offset_bytes;
14601460 header. children = tf ! ( items. len( ) , u32 ) ;
@@ -1958,7 +1958,7 @@ impl Inner {
19581958 . map ( |( k, v) | ( IVec :: from ( k) , v) )
19591959 . collect ( ) ;
19601960
1961- let left_items : Vec < _ > = left_items
1961+ let left_items2 : Vec < _ > = left_items
19621962 . iter ( )
19631963 . map ( |( k, v) | ( KeyRef :: Slice ( & k[ additional_left_prefix..] ) , * v) )
19641964 . collect ( ) ;
@@ -1987,7 +1987,7 @@ impl Inner {
19871987 self . prefix_len + tf ! ( additional_left_prefix, u8 ) ,
19881988 self . is_index ,
19891989 self . next ,
1990- & left_items ,
1990+ & left_items2 ,
19911991 ) ;
19921992
19931993 left. rewrite_generations =
@@ -2055,7 +2055,7 @@ impl Inner {
20552055 && other. fixed_value_length ( ) == Some ( 0 )
20562056 && self . fixed_key_length == other. fixed_key_length
20572057 && self . lo ( ) . len ( ) == other. lo ( ) . len ( )
2058- && self . hi ( ) . map ( |h| h . len ( ) ) == other. hi ( ) . map ( |h| h . len ( ) ) ;
2058+ && self . hi ( ) . map ( < [ _ ] > :: len) == other. hi ( ) . map ( < [ _ ] > :: len) ;
20592059
20602060 if can_seamlessly_absorb {
20612061 let mut ret = self . clone ( ) ;
@@ -2390,8 +2390,8 @@ impl Inner {
23902390 pub ( crate ) fn contains_upper_bound ( & self , bound : & Bound < IVec > ) -> bool {
23912391 if let Some ( hi) = self . hi ( ) {
23922392 match bound {
2393- Bound :: Excluded ( bound ) if hi >= & * bound => true ,
2394- Bound :: Included ( bound ) if hi > & * bound => true ,
2393+ Bound :: Excluded ( b ) if hi >= & * b => true ,
2394+ Bound :: Included ( b ) if hi > & * b => true ,
23952395 _ => false ,
23962396 }
23972397 } else {
@@ -2406,12 +2406,8 @@ impl Inner {
24062406 ) -> bool {
24072407 let lo = self . lo ( ) ;
24082408 match bound {
2409- Bound :: Excluded ( bound)
2410- if lo < & * bound || ( is_forward && * bound == lo) =>
2411- {
2412- true
2413- }
2414- Bound :: Included ( bound) if lo <= & * bound => true ,
2409+ Bound :: Excluded ( b) if lo < & * b || ( is_forward && * b == lo) => true ,
2410+ Bound :: Included ( b) if lo <= & * b => true ,
24152411 Bound :: Unbounded if !is_forward => self . hi ( ) . is_none ( ) ,
24162412 _ => lo. is_empty ( ) ,
24172413 }
0 commit comments