Skip to content

Commit

Permalink
Fix new clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
Martin Sirringhaus authored and jschanck committed Nov 8, 2023
1 parent 0737daf commit 593f505
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/ctap2/commands/mod.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use crate::crypto::{CryptoError, PinUvAuthParam, PinUvAuthToken};
use crate::ctap2::commands::client_pin::{
ClientPinResponse, GetPinRetries, GetUvRetries, PinError,
GetPinRetries, GetUvRetries, PinError,
};
use crate::ctap2::commands::get_info::AuthenticatorInfo;
use crate::ctap2::server::UserVerificationRequirement;
Expand Down Expand Up @@ -158,7 +158,7 @@ pub(crate) fn repackage_pin_errors<D: FidoDevice>(
let cmd = GetPinRetries::new();
// Treat any error as if the device returned a valid response without a pinRetries
// field.
let resp = dev.send_cbor(&cmd).unwrap_or(ClientPinResponse::default());
let resp = dev.send_cbor(&cmd).unwrap_or_default();
AuthenticatorError::PinError(PinError::InvalidPin(resp.pin_retries))
}
HIDError::Command(CommandError::StatusCode(StatusCode::PinAuthBlocked, _)) => {
Expand All @@ -181,7 +181,7 @@ pub(crate) fn repackage_pin_errors<D: FidoDevice>(
let cmd = GetUvRetries::new();
// Treat any error as if the device returned a valid response without a uvRetries
// field.
let resp = dev.send_cbor(&cmd).unwrap_or(ClientPinResponse::default());
let resp = dev.send_cbor(&cmd).unwrap_or_default();
AuthenticatorError::PinError(PinError::InvalidUv(resp.uv_retries))
}
HIDError::Command(CommandError::StatusCode(StatusCode::UvBlocked, _)) => {
Expand Down

0 comments on commit 593f505

Please sign in to comment.