diff options
author | Jesse Luehrs <doy@tozt.net> | 2021-02-19 01:05:27 -0500 |
---|---|---|
committer | Jesse Luehrs <doy@tozt.net> | 2021-02-19 01:05:27 -0500 |
commit | 40f4d51da8c799e3dfb525b99def8f2812689f6c (patch) | |
tree | bd9a6687b8c807792f9fcd07da7c21b75ae2f881 /src/pinentry.rs | |
parent | d8e88421c54d2e74db2b4bd529067393cfbdbc96 (diff) | |
download | rbw-40f4d51da8c799e3dfb525b99def8f2812689f6c.tar.gz rbw-40f4d51da8c799e3dfb525b99def8f2812689f6c.zip |
clippy
Diffstat (limited to 'src/pinentry.rs')
-rw-r--r-- | src/pinentry.rs | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/src/pinentry.rs b/src/pinentry.rs index a4627c2..69bf92c 100644 --- a/src/pinentry.rs +++ b/src/pinentry.rs @@ -86,11 +86,10 @@ where if ncommands == 1 { len = 0; break; - } else { - data.copy_within((nl + 1).., 0); - len -= nl + 1; - ncommands -= 1; } + data.copy_within((nl + 1).., 0); + len -= nl + 1; + ncommands -= 1; } else if data.starts_with(b"D ") { data.copy_within(2..nl, 0); len = nl - 2; @@ -110,11 +109,10 @@ where return Err(Error::PinentryErrorMessage { error: error.to_string(), }); - } else { - return Err(Error::PinentryErrorMessage { - error: format!("unknown error ({})", code), - }); } + return Err(Error::PinentryErrorMessage { + error: format!("unknown error ({})", code), + }); } None => { return Err(Error::PinentryErrorMessage { |