aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorRuben Beltran del Rio <git@r.bdr.sh>2025-01-05 15:48:16 +0100
committerRuben Beltran del Rio <git@r.bdr.sh>2025-01-05 15:48:16 +0100
commitb17907faf8d9693cef94a6048d802bd4ced9102f (patch)
tree1bd87c40e85af675a96b63672163b4caaa174364 /src/main.rs
parentd7fef30ac3f539975ef9edbba8e0af4a4e9ff3de (diff)
Deal with all lints
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs13
1 files changed, 5 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs
index 6c529ed..ae36289 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -22,9 +22,9 @@ fn main() -> Result<()> {
result
} else {
match result {
- Ok(_) => Ok(()),
+ Ok(()) => Ok(()),
Err(e) => {
- eprintln!("{}", e);
+ eprintln!("{e}");
std::process::exit(1);
}
}
@@ -44,19 +44,16 @@ fn run() -> Result<()> {
let command_chain: Vec<Box<dyn Command>> = before_commands
.into_iter()
.chain(once(main_command))
- .chain(after_commands.into_iter())
+ .chain(after_commands)
.collect();
for command in command_chain {
- let result = command.execute(arguments.get(2), &configuration, command_name);
- if let Err(_) = result {
- return result;
- }
+ command.execute(arguments.get(2), &configuration, command_name)?;
}
return Ok(());
}
}
- Help::new().execute(None, &configuration, &"help".to_string())
+ Help::new().execute(None, &configuration, "help")
}