File tree Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Expand file tree Collapse file tree 1 file changed +6
-16
lines changed Original file line number Diff line number Diff line change @@ -91,25 +91,15 @@ impl LocalFeatures {
91
91
}
92
92
93
93
pub ( crate ) fn requires_unknown_bits ( & self ) -> bool {
94
- for ( idx, & byte) in self . flags . iter ( ) . enumerate ( ) {
95
- if idx != 0 && ( byte & 0x55 ) != 0 {
96
- return true ;
97
- } else if idx == 0 && ( byte & 0x14 ) != 0 {
98
- return true ;
99
- }
100
- }
101
- return false ;
94
+ self . flags . iter ( ) . enumerate ( ) . any ( |( idx, & byte) | {
95
+ ( idx != 0 && ( byte & 0x55 ) != 0 ) || ( idx == 0 && ( byte & 0x14 ) != 0 )
96
+ } )
102
97
}
103
98
104
99
pub ( crate ) fn supports_unknown_bits ( & self ) -> bool {
105
- for ( idx, & byte) in self . flags . iter ( ) . enumerate ( ) {
106
- if idx != 0 && byte != 0 {
107
- return true ;
108
- } else if idx == 0 && ( byte & 0xc4 ) != 0 {
109
- return true ;
110
- }
111
- }
112
- return false ;
100
+ self . flags . iter ( ) . enumerate ( ) . any ( |( idx, & byte) | {
101
+ ( idx != 0 && byte != 0 ) || ( idx == 0 && ( byte & 0xc4 ) != 0 )
102
+ } )
113
103
}
114
104
}
115
105
You can’t perform that action at this time.
0 commit comments