File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -18,21 +18,12 @@ enum Action {
1818}
1919
2020fn main ( ) {
21- let mut args = env:: args ( ) . skip ( 1 ) . collect :: < Vec < String > > ( ) ;
22- let mut clean = false ;
21+ let args = env:: args ( ) . skip ( 1 ) . collect :: < Vec < String > > ( ) ;
2322
2423 // Minimal arg parsing to avoid extra deps.
2524 // Usage:
26- // gui-tool [--clean] [ build-and-export|build-lib|export|print-binary-path]
25+ // gui-tool [build-and-export|build-lib|export|print-binary-path]
2726 // Defaults to build-and-export.
28- args. retain ( |a| {
29- if a == "--clean" {
30- clean = true ;
31- false
32- } else {
33- true
34- }
35- } ) ;
3627
3728 let action = match args. get ( 0 ) . map ( |s| s. as_str ( ) ) {
3829 None => Action :: BuildAndExport ,
@@ -42,16 +33,14 @@ fn main() {
4233 Some ( "print-binary-path" ) => Action :: PrintBinaryPath ,
4334 Some ( other) => {
4435 eprintln ! (
45- "Unknown subcommand: {}\n Usage: gui-tool [--clean] [ build-and-export|build-lib|export|print-binary-path]" ,
36+ "Unknown subcommand: {}\n Usage: gui-tool [build-and-export|build-lib|export|print-binary-path]" ,
4637 other
4738 ) ;
4839 std:: process:: exit ( 2 ) ;
4940 }
5041 } ;
5142
52- if clean {
53- clean_build_dirs ( ) ;
54- }
43+ clean_build_dirs ( ) ;
5544
5645 let is_debug_build = cfg ! ( debug_assertions) ;
5746 match action {
You can’t perform that action at this time.
0 commit comments