File tree 1 file changed +7
-9
lines changed
1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -226,28 +226,26 @@ impl Cfg {
226
226
/// See `tests::test_simplify_with` for examples.
227
227
pub ( crate ) fn simplify_with ( & self , assume : & Self ) -> Option < Self > {
228
228
if self == assume {
229
- return None ;
230
- }
231
-
232
- if let Cfg :: All ( a) = self {
229
+ None
230
+ } else if let Cfg :: All ( a) = self {
233
231
let mut sub_cfgs: Vec < Cfg > = if let Cfg :: All ( b) = assume {
234
232
a. iter ( ) . filter ( |a| !b. contains ( a) ) . cloned ( ) . collect ( )
235
233
} else {
236
234
a. iter ( ) . filter ( |& a| a != assume) . cloned ( ) . collect ( )
237
235
} ;
238
236
let len = sub_cfgs. len ( ) ;
239
- return match len {
237
+ match len {
240
238
0 => None ,
241
239
1 => sub_cfgs. pop ( ) ,
242
240
_ => Some ( Cfg :: All ( sub_cfgs) ) ,
243
- } ;
241
+ }
244
242
} else if let Cfg :: All ( b) = assume
245
243
&& b. contains ( self )
246
244
{
247
- return None ;
245
+ None
246
+ } else {
247
+ Some ( self . clone ( ) )
248
248
}
249
-
250
- Some ( self . clone ( ) )
251
249
}
252
250
}
253
251
You can’t perform that action at this time.
0 commit comments