Fix clippy warnings: remove explicit lifetime and unneeded Deref impl

This commit is contained in:
Wiktor Kwapisiewicz 2023-02-01 12:35:39 +01:00
parent 4510c34cdc
commit c81f3ba6a9
2 changed files with 2 additions and 16 deletions

View file

@ -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<Transaction<'app>>,
pub fn make_cert(
open: &mut Card<Transaction<'_>>,
key_sig: PublicKey,
key_dec: Option<PublicKey>,
key_aut: Option<PublicKey>,

View file

@ -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