@@ -902,7 +902,7 @@ pub(crate) trait BucketIApi<'tx, T: TxIApi<'tx>>:
902
902
903
903
/// See [BucketApi::bucket]
904
904
fn api_bucket ( self , name : & [ u8 ] ) -> Option < Self > {
905
- if let Some ( w) = self . split_ow ( ) . deref ( ) {
905
+ if let Some ( w) = self . split_ow ( ) . as_ref ( ) {
906
906
if let Some ( child) = w. buckets . get ( name) {
907
907
return Some ( * child) ;
908
908
}
@@ -917,7 +917,7 @@ pub(crate) trait BucketIApi<'tx, T: TxIApi<'tx>>:
917
917
918
918
// Otherwise create a bucket and cache it.
919
919
let child = self . open_bucket ( v) ;
920
- if let Some ( ref mut w) = self . split_ow_mut ( ) . deref_mut ( ) {
920
+ if let Some ( w) = self . split_ow_mut ( ) . as_mut ( ) {
921
921
let tx = self . split_bound ( ) ;
922
922
let bump = tx. bump ( ) ;
923
923
let name = bump. alloc_slice_copy ( name) ;
@@ -1089,15 +1089,15 @@ pub(crate) trait BucketIApi<'tx, T: TxIApi<'tx>>:
1089
1089
if id != ZERO_PGID {
1090
1090
panic ! ( "inline bucket non-zero page access(2): {} != 0" , id)
1091
1091
}
1092
- return if let Some ( root_node) = w. as_ref ( ) . map ( |wb| wb. root_node ) . flatten ( ) {
1092
+ return if let Some ( root_node) = w. as_ref ( ) . and_then ( |wb| wb. root_node ) {
1093
1093
PageNode :: Node ( root_node)
1094
1094
} else {
1095
1095
PageNode :: Page ( r. inline_page . unwrap ( ) )
1096
1096
} ;
1097
1097
}
1098
1098
1099
1099
// Check the node cache for non-inline buckets.
1100
- if let Some ( wb) = w. deref ( ) {
1100
+ if let Some ( wb) = w. as_ref ( ) {
1101
1101
if let Some ( node) = wb. nodes . get ( & id) {
1102
1102
return PageNode :: Node ( * node) ;
1103
1103
}
0 commit comments