File tree 1 file changed +5
-4
lines changed 1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -179,7 +179,7 @@ fn build_feature_map(
179
179
let explicitly_listed: HashSet < _ > = map
180
180
. values ( )
181
181
. flatten ( )
182
- . filter_map ( |fv| fv. explicitly_name ( ) )
182
+ . filter_map ( |fv| fv. explicit_dep_name ( ) )
183
183
. collect ( ) ;
184
184
for dep in dependencies {
185
185
if !dep. is_optional ( ) {
@@ -198,7 +198,7 @@ fn build_feature_map(
198
198
FeatureName :: new ( feature) ?;
199
199
for fv in fvs {
200
200
// Find data for the referenced dependency...
201
- let dep_data = dep_map. get ( & fv. dep_name ( ) ) ;
201
+ let dep_data = dep_map. get ( & fv. feature_or_dep_name ( ) ) ;
202
202
let is_any_dep = dep_data. is_some ( ) ;
203
203
let is_optional_dep = dep_data. is_some_and ( |& o| o) ;
204
204
match fv {
@@ -351,14 +351,15 @@ impl FeatureValue {
351
351
}
352
352
}
353
353
354
- fn explicitly_name ( & self ) -> Option < InternedString > {
354
+ /// Returns the name of the dependency if and only if it was explicitly named with the `dep:` syntax.
355
+ fn explicit_dep_name ( & self ) -> Option < InternedString > {
355
356
match self {
356
357
FeatureValue :: Dep { dep_name, .. } => Some ( * dep_name) ,
357
358
_ => None ,
358
359
}
359
360
}
360
361
361
- fn dep_name ( & self ) -> InternedString {
362
+ fn feature_or_dep_name ( & self ) -> InternedString {
362
363
match self {
363
364
FeatureValue :: Feature ( dep_name)
364
365
| FeatureValue :: Dep { dep_name, .. }
You can’t perform that action at this time.
0 commit comments