Skip to content

Commit c2ce530

Browse files
committed
Run cargo fmt
1 parent e55104a commit c2ce530

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

src/args.rs

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,18 @@ pub(crate) fn parse_args() -> Result<Command, ErrorMessage> {
88
let mut args = env::args();
99
let is_cargo_bootimage = {
1010
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());
1214
file_stem == Some("cargo-bootimage")
1315
};
1416
let first = args.next();
1517
match first.as_ref().map(|s| s.as_str()) {
1618
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+
}),
2223
Some("run") => parse_build_args(args).map(|cmd| match cmd {
2324
Command::Build(args) => Command::Run(args),
2425
Command::BuildHelp => Command::RunHelp,

0 commit comments

Comments
 (0)