File tree Expand file tree Collapse file tree 1 file changed +7
-9
lines changed
Expand file tree Collapse file tree 1 file changed +7
-9
lines changed Original file line number Diff line number Diff line change @@ -226,28 +226,26 @@ impl Cfg {
226226 /// See `tests::test_simplify_with` for examples.
227227 pub ( crate ) fn simplify_with ( & self , assume : & Self ) -> Option < Self > {
228228 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 {
233231 let mut sub_cfgs: Vec < Cfg > = if let Cfg :: All ( b) = assume {
234232 a. iter ( ) . filter ( |a| !b. contains ( a) ) . cloned ( ) . collect ( )
235233 } else {
236234 a. iter ( ) . filter ( |& a| a != assume) . cloned ( ) . collect ( )
237235 } ;
238236 let len = sub_cfgs. len ( ) ;
239- return match len {
237+ match len {
240238 0 => None ,
241239 1 => sub_cfgs. pop ( ) ,
242240 _ => Some ( Cfg :: All ( sub_cfgs) ) ,
243- } ;
241+ }
244242 } else if let Cfg :: All ( b) = assume
245243 && b. contains ( self )
246244 {
247- return None ;
245+ None
246+ } else {
247+ Some ( self . clone ( ) )
248248 }
249-
250- Some ( self . clone ( ) )
251249 }
252250}
253251
You can’t perform that action at this time.
0 commit comments