aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nitrocli/src/args.rs8
1 files changed, 3 insertions, 5 deletions
diff --git a/nitrocli/src/args.rs b/nitrocli/src/args.rs
index 43f866d..3331779 100644
--- a/nitrocli/src/args.rs
+++ b/nitrocli/src/args.rs
@@ -177,11 +177,9 @@ fn parse(
args: Vec<String>,
) -> Result<()> {
let (stdout, stderr) = ctx.stdio();
- if let Err(err) = parser.parse(args, stdout, stderr) {
- Err(Error::ArgparseError(err))
- } else {
- Ok(())
- }
+ parser
+ .parse(args, stdout, stderr)
+ .map_err(Error::ArgparseError)
}
/// Inquire the status of the nitrokey.