diff options
author | Daniel Mueller <deso@posteo.net> | 2019-01-08 20:46:27 -0800 |
---|---|---|
committer | Daniel Mueller <deso@posteo.net> | 2019-01-08 20:46:27 -0800 |
commit | f01d63d978505badf3400df54b592e51dc0f7654 (patch) | |
tree | 031ac644601ec3ab23c479fc37a8248067142ac2 /nitrocli/src/commands.rs | |
parent | 333d17fb7b7a0eb43b7907fe7282c36ded2bd22e (diff) | |
download | nitrocli-f01d63d978505badf3400df54b592e51dc0f7654.tar.gz nitrocli-f01d63d978505badf3400df54b592e51dc0f7654.tar.bz2 |
Show fmt::Display formatted errors instead of fmt::Debug ones
At some point in the past nitrokey::CommandError was lacking an
implementation of the fmt::Display trait. Hence, we fell back to
printing these errors in debug format.
Since version 0.2.0 of the crate fmt::Display is implemented for these
errors. With this change we use it to report more user-friendly error
messages.
Diffstat (limited to 'nitrocli/src/commands.rs')
-rw-r--r-- | nitrocli/src/commands.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/nitrocli/src/commands.rs b/nitrocli/src/commands.rs index c86f20b..a5600b1 100644 --- a/nitrocli/src/commands.rs +++ b/nitrocli/src/commands.rs @@ -35,7 +35,7 @@ use crate::Result; /// Create an `error::Error` with an error message of the format `msg: err`. fn get_error(msg: &str, err: nitrokey::CommandError) -> Error { - Error::Error(format!("{}: {:?}", msg, err)) + Error::Error(format!("{}: {}", msg, err)) } /// Set `libnitrokey`'s log level based on the execution context's verbosity. |