@@ -160,16 +160,7 @@ impl Feature {
160160 ) -> bool {
161161 if let Some ( v) = map. get ( cur) {
162162 for cur in v {
163- let fname = if let Some ( slash_idx) = cur. find ( '/' ) {
164- // The fname may still have a '?' suffix, which is fine.
165- // Because in that case it doesn't activate that dependency, so it can be ignored.
166- let ( fname, _) = cur. split_at ( slash_idx) ;
167- fname
168- } else {
169- // Could be 'dep:something', which is fine because it's not a feature.
170- cur
171- } ;
172- if fname != root && ( group. matches ( fname) || rec ( group, map, fname, root) ) {
163+ if cur != root && ( group. matches ( cur) || rec ( group, map, cur, root) ) {
173164 return true ;
174165 }
175166 }
@@ -405,25 +396,6 @@ mod tests {
405396 vec![ "b" , "async-std" ]
406397 ] ) ;
407398
408- let map = map ! [
409- ( "tokio" , v![ ] ) ,
410- ( "async-std" , v![ ] ) ,
411- ( "a" , v![ "tokio/full" ] ) ,
412- ( "b" , v![ "async-std?/alloc" ] )
413- ] ;
414- let list = v ! [ "a" , "b" , "tokio" , "async-std" ] ;
415- let mutually_exclusive_features = [ Feature :: group ( [ "tokio" , "async-std" ] ) ] ;
416- let filtered = feature_powerset ( & list, None , & [ ] , & mutually_exclusive_features, & map) ;
417- assert_eq ! ( filtered, vec![
418- vec![ "a" ] ,
419- vec![ "b" ] ,
420- vec![ "a" , "b" ] ,
421- vec![ "tokio" ] ,
422- vec![ "b" , "tokio" ] ,
423- vec![ "async-std" ] ,
424- vec![ "b" , "async-std" ]
425- ] ) ;
426-
427399 let map = map ! [ ( "a" , v![ ] ) , ( "b" , v![ "a" ] ) , ( "c" , v![ ] ) , ( "d" , v![ "b" ] ) ] ;
428400 let list = v ! [ "a" , "b" , "c" , "d" ] ;
429401 let mutually_exclusive_features = [ Feature :: group ( [ "a" , "c" ] ) ] ;
0 commit comments