From c81f3ba6a9df9a3743d23d2e7c150ac979e18724 Mon Sep 17 00:00:00 2001 From: Wiktor Kwapisiewicz Date: Wed, 1 Feb 2023 12:35:39 +0100 Subject: [PATCH] Fix clippy warnings: remove explicit lifetime and unneeded Deref impl --- openpgp-card-sequoia/src/util.rs | 4 ++-- openpgp-card/src/lib.rs | 14 -------------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/openpgp-card-sequoia/src/util.rs b/openpgp-card-sequoia/src/util.rs index 6422057..5583187 100644 --- a/openpgp-card-sequoia/src/util.rs +++ b/openpgp-card-sequoia/src/util.rs @@ -37,8 +37,8 @@ use crate::{Card, PublicKey}; /// /// FIXME: accept optional metadata for user_id(s)? #[allow(clippy::too_many_arguments)] -pub fn make_cert<'app>( - open: &mut Card>, +pub fn make_cert( + open: &mut Card>, key_sig: PublicKey, key_dec: Option, key_aut: Option, diff --git a/openpgp-card/src/lib.rs b/openpgp-card/src/lib.rs index 4119254..a89a12a 100644 --- a/openpgp-card/src/lib.rs +++ b/openpgp-card/src/lib.rs @@ -39,7 +39,6 @@ mod openpgp; mod tlv; use std::convert::TryInto; -use std::ops::{Deref, DerefMut}; use crate::apdu::commands; use crate::card_do::ApplicationRelatedData; @@ -186,19 +185,6 @@ pub trait CardTransaction { } } -impl<'a> Deref for dyn CardTransaction + Send + Sync + 'a { - type Target = dyn CardTransaction + 'a; - - fn deref(&self) -> &Self::Target { - self - } -} -impl<'a> DerefMut for dyn CardTransaction + Send + Sync + 'a { - fn deref_mut(&mut self) -> &mut Self::Target { - self - } -} - /// Information about the capabilities of a card. /// /// CardCaps is used to signal capabilities (chaining, extended length support, max