File tree Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Expand file tree Collapse file tree 1 file changed +7
-6
lines changed Original file line number Diff line number Diff line change @@ -8,17 +8,18 @@ pub(crate) fn parse_args() -> Result<Command, ErrorMessage> {
8
8
let mut args = env:: args ( ) ;
9
9
let is_cargo_bootimage = {
10
10
let executable_name = args. next ( ) . ok_or ( "no first argument (executable name)" ) ?;
11
- let file_stem = Path :: new ( & executable_name) . file_stem ( ) . and_then ( |s| s. to_str ( ) ) ;
11
+ let file_stem = Path :: new ( & executable_name)
12
+ . file_stem ( )
13
+ . and_then ( |s| s. to_str ( ) ) ;
12
14
file_stem == Some ( "cargo-bootimage" )
13
15
} ;
14
16
let first = args. next ( ) ;
15
17
match first. as_ref ( ) . map ( |s| s. as_str ( ) ) {
16
18
Some ( "build" ) => parse_build_args ( args) ,
17
- Some ( "bootimage" ) if is_cargo_bootimage => parse_build_args ( args)
18
- . map ( |cmd| match cmd {
19
- Command :: BuildHelp => Command :: CargoBootimageHelp ,
20
- cmd => cmd,
21
- } ) ,
19
+ Some ( "bootimage" ) if is_cargo_bootimage => parse_build_args ( args) . map ( |cmd| match cmd {
20
+ Command :: BuildHelp => Command :: CargoBootimageHelp ,
21
+ cmd => cmd,
22
+ } ) ,
22
23
Some ( "run" ) => parse_build_args ( args) . map ( |cmd| match cmd {
23
24
Command :: Build ( args) => Command :: Run ( args) ,
24
25
Command :: BuildHelp => Command :: RunHelp ,
You can’t perform that action at this time.
0 commit comments