Currently, main returns a Result<(), Box<dyn Error>>, which means
- The exit code is always 0 or 1
- The error message is a debug print of the Error
Context is also not provided for errors. Use https://docs.rs/anyhow/latest/anyhow/.
Clap also calls exit(2) directly. try_parse should be used instead.
Using https://crates.io/crates/exitcode would be a good idea for informative exit codes.
Currently, main returns a
Result<(), Box<dyn Error>>, which meansContext is also not provided for errors. Use https://docs.rs/anyhow/latest/anyhow/.
Clap also calls
exit(2)directly.try_parseshould be used instead.Using https://crates.io/crates/exitcode would be a good idea for informative exit codes.