summaryrefslogtreecommitdiffstats
path: root/openpgp
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2021-09-21 18:18:31 +0300
committerLars Wirzenius <liw@sequoia-pgp.org>2021-09-30 08:31:05 +0300
commit612ff65ffae21c1b6d3906d4df432e80554f4dd9 (patch)
treee342a9551def5a823885b625568edb3cae6518a2 /openpgp
parentbc7992d35667ed05dc59c5876372f785df97c63b (diff)
Drop unnecessary conversions with .into() to the same type
The code used to do foo.into(), but the result was of the same type as foo already was. Thus the extra call is redundant and likely to confuse a reader. Found by clippy lint useless_conversion: https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
Diffstat (limited to 'openpgp')
-rw-r--r--openpgp/src/cert/revoke.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/openpgp/src/cert/revoke.rs b/openpgp/src/cert/revoke.rs
index fbe6a532..c3b02077 100644
--- a/openpgp/src/cert/revoke.rs
+++ b/openpgp/src/cert/revoke.rs
@@ -249,7 +249,7 @@ impl TryFrom<signature::SignatureBuilder> for CertRevocationBuilder {
return Err(
crate::Error::InvalidArgument(
format!("Expected signature type to be KeyRevocation but got {}",
- builder.typ()).into()).into());
+ builder.typ())).into());
}
Ok(Self {
builder
@@ -493,7 +493,7 @@ impl TryFrom<signature::SignatureBuilder> for SubkeyRevocationBuilder {
return Err(
crate::Error::InvalidArgument(
format!("Expected signature type to be SubkeyRevocation but got {}",
- builder.typ()).into()).into());
+ builder.typ())).into());
}
Ok(Self {
builder
@@ -745,7 +745,7 @@ impl TryFrom<signature::SignatureBuilder> for UserIDRevocationBuilder {
return Err(
crate::Error::InvalidArgument(
format!("Expected signature type to be CertificationRevocation but got {}",
- builder.typ()).into()).into());
+ builder.typ())).into());
}
Ok(Self {
builder
@@ -1011,7 +1011,7 @@ impl TryFrom<signature::SignatureBuilder> for UserAttributeRevocationBuilder {
return Err(
crate::Error::InvalidArgument(
format!("Expected signature type to be CertificationRevocation but got {}",
- builder.typ()).into()).into());
+ builder.typ())).into());
}
Ok(Self {
builder