mirror of
https://github.com/trussed-dev/piv-authenticator.git
synced 2026-06-20 04:16:15 -07:00
Fix clippy warnings
This commit is contained in:
committed by
Nicolas Stalder
parent
4892544fdc
commit
2f9ee62a28
+9
-9
@@ -58,7 +58,7 @@ impl Default for Options {
|
||||
|
||||
impl Options {
|
||||
pub fn storage(self, storage: Location) -> Self {
|
||||
Self { storage, ..self }
|
||||
Self { storage }
|
||||
}
|
||||
}
|
||||
|
||||
@@ -493,17 +493,17 @@ impl<'a, T: trussed::Client + trussed::client::Ed255> LoadedAuthenticator<'a, T>
|
||||
exponentiation: None,
|
||||
} => self.mutual_auth_2(auth, r, c, reply.lend())?,
|
||||
Auth {
|
||||
witness,
|
||||
challenge,
|
||||
response,
|
||||
exponentiation,
|
||||
witness: _witness,
|
||||
challenge: _challenge,
|
||||
response: _response,
|
||||
exponentiation: _exponentiation,
|
||||
} => {
|
||||
warn!(
|
||||
"General authenticate with unexpected data: witness: {:?}, challenge: {:?}, response: {:?}, exponentiation: {:?}",
|
||||
witness.map(|s|s.len()),
|
||||
challenge.map(|s|s.len()),
|
||||
response.map(|s|s.len()),
|
||||
exponentiation.map(|s|s.len()),
|
||||
_witness.map(|s|s.len()),
|
||||
_challenge.map(|s|s.len()),
|
||||
_response.map(|s|s.len()),
|
||||
_exponentiation.map(|s|s.len()),
|
||||
);
|
||||
return Err(Status::IncorrectDataParameter);
|
||||
}
|
||||
|
||||
@@ -12,8 +12,9 @@ use serde::Deserialize;
|
||||
use trussed::types::GenericArray;
|
||||
|
||||
// iso7816::Status doesn't support serde
|
||||
#[derive(Deserialize, Debug, PartialEq, Clone, Copy)]
|
||||
#[derive(Deserialize, Debug, PartialEq, Clone, Copy, Default)]
|
||||
enum Status {
|
||||
#[default]
|
||||
Success,
|
||||
MoreAvailable(u8),
|
||||
VerificationFailed,
|
||||
@@ -178,12 +179,6 @@ impl TryFrom<u16> for Status {
|
||||
}
|
||||
}
|
||||
|
||||
impl Default for Status {
|
||||
fn default() -> Status {
|
||||
Status::Success
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Deserialize, Debug)]
|
||||
#[serde(deny_unknown_fields)]
|
||||
struct IoTest {
|
||||
|
||||
Reference in New Issue
Block a user