diff options
author | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-06 21:24:59 +0200 |
---|---|---|
committer | Nora Widdecke <nora@sequoia-pgp.org> | 2021-04-09 13:13:58 +0200 |
commit | 5d029cbf42621452666bd084f7beecb7d3d885a4 (patch) | |
tree | 21219c5864beac97ff5c55c78b436918034adcd6 /openpgp/src/parse/stream.rs | |
parent | 9424cd350f32a97479a74d919c646f9e26c2ebce (diff) |
Lint: Remove unnecessary conversions.
- https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Diffstat (limited to 'openpgp/src/parse/stream.rs')
-rw-r--r-- | openpgp/src/parse/stream.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/openpgp/src/parse/stream.rs b/openpgp/src/parse/stream.rs index ad1318c5..1d54b563 100644 --- a/openpgp/src/parse/stream.rs +++ b/openpgp/src/parse/stream.rs @@ -2378,7 +2378,7 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> { } else { if let Err(err) = pp.possible_message() { t!("Malformed message: {}", err); - return Err(err.context("Malformed OpenPGP message").into()); + return Err(err.context("Malformed OpenPGP message")); } } @@ -2519,7 +2519,7 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> { // Attach digest to the signature. let mut digest = vec![0; hash.digest_size()]; let _ = hash.digest(&mut digest); - sig.set_computed_digest(Some(digest.into())); + sig.set_computed_digest(Some(digest)); } } @@ -2645,7 +2645,7 @@ impl<'a, H: VerificationHelper + DecryptionHelper> Decryptor<'a, H> { if let Err(err) = possible_message { return Err(err.context( - "Malformed OpenPGP message").into()); + "Malformed OpenPGP message")); } self.push_sig(p)?; |