@@ -7,9 +7,7 @@ use crate::core::compiler::unit_dependencies;
77use crate :: core:: compiler:: { BuildConfig , BuildContext , CompileKind , CompileMode , Context } ;
88use crate :: core:: compiler:: { RustcTargetData , UnitInterner } ;
99use crate :: core:: profiles:: { Profiles , UnitFor } ;
10- use crate :: core:: resolver:: features:: {
11- FeatureResolver , FeaturesFor , HasDevUnits , RequestedFeatures ,
12- } ;
10+ use crate :: core:: resolver:: features:: { FeatureResolver , HasDevUnits , RequestedFeatures } ;
1311use crate :: core:: { PackageIdSpec , Workspace } ;
1412use crate :: ops;
1513use crate :: util:: errors:: { CargoResult , CargoResultExt } ;
@@ -120,10 +118,7 @@ pub fn clean(ws: &Workspace<'_>, opts: &CleanOptions<'_>) -> CargoResult<()> {
120118 } ;
121119 // Use unverified here since this is being more
122120 // exhaustive than what is actually needed.
123- let features_for = match unit_for. is_for_build_dep ( ) {
124- true => FeaturesFor :: BuildDep ,
125- false => FeaturesFor :: NormalOrDev ,
126- } ;
121+ let features_for = unit_for. map_to_features_for ( ) ;
127122 let features =
128123 features. activated_features_unverified ( pkg. package_id ( ) , features_for) ;
129124 units. push ( bcx. units . intern (
0 commit comments