File tree Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Expand file tree Collapse file tree 2 files changed +2
-2
lines changed Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ impl ListStore {
100
100
"Incorrect `new_order` slice length. Expected `{count}`, found `{}`." ,
101
101
new_order. len( )
102
102
) ;
103
- let safe_values = new_order. iter ( ) . max ( ) . map_or ( true , |& max| {
103
+ let safe_values = new_order. iter ( ) . max ( ) . is_none_or ( |& max| {
104
104
let max = max as i32 ;
105
105
max >= 0 && max < count
106
106
} ) ;
Original file line number Diff line number Diff line change @@ -102,7 +102,7 @@ impl TreeStore {
102
102
"Incorrect `new_order` slice length. Expected `{count}`, found `{}`." ,
103
103
new_order. len( )
104
104
) ;
105
- let safe_values = new_order. iter ( ) . max ( ) . map_or ( true , |& max| {
105
+ let safe_values = new_order. iter ( ) . max ( ) . is_none_or ( |& max| {
106
106
let max = max as i32 ;
107
107
max >= 0 && max < count
108
108
} ) ;
You can’t perform that action at this time.
0 commit comments