diff --git a/src/device/pcsc.rs b/src/device/pcsc.rs index 348bab5..bdbcd22 100644 --- a/src/device/pcsc.rs +++ b/src/device/pcsc.rs @@ -134,7 +134,7 @@ impl Device { } attribute }) - .unwrap_or_else(|| "".to_string()) + .unwrap_or_default() } } diff --git a/src/firmware.rs b/src/firmware.rs index 7bce386..9ffe5cb 100644 --- a/src/firmware.rs +++ b/src/firmware.rs @@ -26,10 +26,10 @@ impl Firmware { // pub fn verify(&self) -> Result<()> { // } - pub fn write_to<'a>( + pub fn write_to( &self, bootloader: &lpc55::Bootloader, - progress: Option<&'a dyn Fn(usize)>, + progress: Option<&dyn Fn(usize)>, ) { bootloader.receive_sb_file(&self.content, progress); } diff --git a/src/pki/dev.rs b/src/pki/dev.rs index c53dda5..5734abe 100644 --- a/src/pki/dev.rs +++ b/src/pki/dev.rs @@ -44,7 +44,7 @@ pub fn generate_selfsigned_fido() -> ([u8; 16], [u8; 36], String, rcgen::Certifi let key_pkcs8 = keypair.serialize_der(); let key_pem = keypair.serialize_pem(); - let key_info: p256::pkcs8::PrivateKeyInfo = key_pkcs8.as_slice().try_into().unwrap(); + let key_info: pkcs8::PrivateKeyInfo = key_pkcs8.as_slice().try_into().unwrap(); let secret_key: [u8; 32] = p256::SecretKey::try_from(key_info) .unwrap() .to_be_bytes() diff --git a/src/transport/ctap.rs b/src/transport/ctap.rs index 1c1b78c..e01154e 100644 --- a/src/transport/ctap.rs +++ b/src/transport/ctap.rs @@ -189,8 +189,7 @@ impl Device { pub fn call(&self, channel: Channel, request: Command) -> Result> { let result: Result> = request .packets(channel) - .enumerate() - .map(|(_i, packet)| { + .map(|packet| { // need to prefix report ID let mut prefixed = vec![0]; prefixed.extend_from_slice(&packet);