From 612ff65ffae21c1b6d3906d4df432e80554f4dd9 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Tue, 21 Sep 2021 18:18:31 +0300 Subject: 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 --- openpgp/src/cert/revoke.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'openpgp') 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 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 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 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 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 -- cgit v1.2.3