Fix cargo clippy issues
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2025-07-09 15:05:30 +02:00
parent e3e4e8280c
commit 8a14521d6e
15 changed files with 54 additions and 87 deletions

View File

@@ -108,15 +108,11 @@ impl WebAuthManager {
) -> Res<WebauthnPubKey> {
let state: RegisterKeyOpaqueData = self.crypto_wrapper.decrypt(opaque_state)?;
if state.user_id != user.uid {
return Err(Box::new(std::io::Error::other(
"Invalid user for pubkey!",
)));
return Err(Box::new(std::io::Error::other("Invalid user for pubkey!")));
}
if state.expire < time() {
return Err(Box::new(std::io::Error::other(
"Challenge has expired!",
)));
return Err(Box::new(std::io::Error::other("Challenge has expired!")));
}
let res = self.core.finish_passkey_registration(
@@ -154,15 +150,11 @@ impl WebAuthManager {
) -> Res {
let state: AuthStateOpaqueData = self.crypto_wrapper.decrypt(opaque_state)?;
if &state.user_id != user_id {
return Err(Box::new(std::io::Error::other(
"Invalid user for pubkey!",
)));
return Err(Box::new(std::io::Error::other("Invalid user for pubkey!")));
}
if state.expire < time() {
return Err(Box::new(std::io::Error::other(
"Challenge has expired!",
)));
return Err(Box::new(std::io::Error::other("Challenge has expired!")));
}
self.core.finish_passkey_authentication(