@@ -21,24 +21,22 @@ use opt::{Action, BuildOpt, ClippyOpt, DocOpt, Opt, QemuOpt, TpmVersion};
21
21
use std:: process:: Command ;
22
22
use util:: run_cmd;
23
23
24
+ /// Builds various feature permutations that are valid for the `uefi` crate.
24
25
fn build_feature_permutations ( opt : & BuildOpt ) -> Result < ( ) > {
25
- // TODO we should now rethink this
26
- for package in [ Package :: Uefi ] {
27
- let all_package_features = Feature :: package_features ( package) ;
28
- for features in all_package_features. iter ( ) . powerset ( ) {
29
- let features = features. iter ( ) . map ( |f| * * f) . collect ( ) ;
26
+ let all_package_features = Feature :: package_features ( Package :: Uefi ) ;
27
+ for features in all_package_features. iter ( ) . powerset ( ) {
28
+ let features = features. iter ( ) . map ( |f| * * f) . collect ( ) ;
30
29
31
- let cargo = Cargo {
32
- action : CargoAction :: Build ,
33
- features,
34
- packages : vec ! [ package] ,
35
- release : opt. build_mode . release ,
36
- target : Some ( * opt. target ) ,
37
- warnings_as_errors : true ,
38
- target_types : TargetTypes :: BinsExamplesLib ,
39
- } ;
40
- run_cmd ( cargo. command ( ) ?) ?;
41
- }
30
+ let cargo = Cargo {
31
+ action : CargoAction :: Build ,
32
+ features,
33
+ packages : vec ! [ Package :: Uefi ] ,
34
+ release : opt. build_mode . release ,
35
+ target : Some ( * opt. target ) ,
36
+ warnings_as_errors : true ,
37
+ target_types : TargetTypes :: BinsExamplesLib ,
38
+ } ;
39
+ run_cmd ( cargo. command ( ) ?) ?;
42
40
}
43
41
44
42
Ok ( ( ) )
0 commit comments