diff options
author | Jesse Luehrs <doy@tozt.net> | 2020-04-12 04:55:54 -0400 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2020-04-12 04:55:54 -0400 |
commit | 3884ac4c0543329e8da96485e6ae626cb6a16a22 (patch) | |
tree | c5552fb86e5920fd7328e9f7c86d0cc8fd3a9c18 | |
parent | 201d2d40cac8760fb69b9282ba2a4f9f7ec82d47 (diff) | |
download | rbw-3884ac4c0543329e8da96485e6ae626cb6a16a22.tar.gz rbw-3884ac4c0543329e8da96485e6ae626cb6a16a22.zip |
better error message
-rw-r--r-- | src/error.rs | 2 | ||||
-rw-r--r-- | src/pinentry.rs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/error.rs b/src/error.rs index 6a5244f..71c8285 100644 --- a/src/error.rs +++ b/src/error.rs @@ -10,7 +10,7 @@ pub enum Error { Decrypt { source: block_modes::BlockModeError }, #[snafu(display("failed to parse pinentry output ({:?})", out,))] - FailedToParsePinentry { out: Vec<u8> }, + FailedToParsePinentry { out: String }, // no Error impl // #[snafu(display("failed to expand with hkdf: {}", source))] diff --git a/src/pinentry.rs b/src/pinentry.rs index 769b8d0..a8d607b 100644 --- a/src/pinentry.rs +++ b/src/pinentry.rs @@ -71,7 +71,7 @@ async fn read_password< break; } else { return Err(Error::FailedToParsePinentry { - out: data.to_vec(), + out: String::from_utf8_lossy(data).to_string(), }); } } else { |