@@ -453,7 +453,7 @@ impl<'tu, 'ge> Class<'tu, 'ge> {
453453 let fld_declname = fld_refname. localname ( ) ;
454454 let ( mut read_const_yield, mut read_mut_yield) = if read_write. is_read ( ) {
455455 if fld_const. is_mut ( ) && passed_by_ref {
456- let read_const_func = if constness_filter. map_or ( true , |c| c. is_const ( ) ) {
456+ let read_const_func = if constness_filter. is_none_or ( |c| c. is_const ( ) ) {
457457 Some ( Func :: new_desc (
458458 FuncDesc :: new (
459459 FuncKind :: FieldAccessor ( cls. clone ( ) , fld. clone ( ) ) ,
@@ -472,7 +472,7 @@ impl<'tu, 'ge> Class<'tu, 'ge> {
472472 } else {
473473 None
474474 } ;
475- let read_mut_func = if constness_filter. map_or ( true , |c| c. is_mut ( ) ) {
475+ let read_mut_func = if constness_filter. is_none_or ( |c| c. is_mut ( ) ) {
476476 Some ( Func :: new_desc (
477477 FuncDesc :: new (
478478 FuncKind :: FieldAccessor ( cls. clone ( ) , fld. clone ( ) ) ,
@@ -493,7 +493,7 @@ impl<'tu, 'ge> Class<'tu, 'ge> {
493493 } ;
494494 ( read_const_func, read_mut_func)
495495 } else {
496- let single_read_func = if constness_filter. map_or ( true , |c| c == fld_const) {
496+ let single_read_func = if constness_filter. is_none_or ( |c| c == fld_const) {
497497 Some ( Func :: new_desc (
498498 FuncDesc :: new (
499499 FuncKind :: FieldAccessor ( cls. clone ( ) , fld. clone ( ) ) ,
@@ -518,7 +518,7 @@ impl<'tu, 'ge> Class<'tu, 'ge> {
518518 ( None , None )
519519 } ;
520520 let mut write_yield = if read_write. is_write ( )
521- && constness_filter. map_or ( true , |c| c. is_mut ( ) )
521+ && constness_filter. is_none_or ( |c| c. is_mut ( ) )
522522 && !fld_type_ref. constness ( ) . is_const ( )
523523 && !fld_type_kind. as_fixed_array ( ) . is_some ( )
524524 {
0 commit comments