about summary refs log tree commit diff
path: root/kittybox-rs/src
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2022-09-21 10:44:15 +0300
committerVika <vika@fireburn.ru>2022-09-28 00:59:43 +0300
commit2f02bf76a40c971b9404aa0913bc8baa7dfde24c (patch)
tree4ce2dfac9564ce80af02df5b802c10cf4d100f2e /kittybox-rs/src
parente5281c6da75f115d01aa5bef2f460ebd5b30a656 (diff)
downloadkittybox-2f02bf76a40c971b9404aa0913bc8baa7dfde24c.tar.zst
Fix some clippy errors
Diffstat (limited to 'kittybox-rs/src')
-rw-r--r--kittybox-rs/src/indieauth/mod.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/kittybox-rs/src/indieauth/mod.rs b/kittybox-rs/src/indieauth/mod.rs
index 44cb368..36f207c 100644
--- a/kittybox-rs/src/indieauth/mod.rs
+++ b/kittybox-rs/src/indieauth/mod.rs
@@ -6,6 +6,7 @@ use axum::{
     http::StatusCode, TypedHeader, headers::{Authorization, authorization::Bearer},
     Extension
 };
+#[cfg_attr(not(feature = "webauthn"), allow(unused_imports))]
 use axum_extra::extract::cookie::{CookieJar, Cookie};
 use crate::database::Storage;
 use kittybox_indieauth::{
@@ -126,6 +127,7 @@ async fn verify_credential<A: AuthBackend>(
     auth: &A,
     website: &url::Url,
     credential: Credential,
+    #[cfg_attr(not(feature = "webauthn"), allow(unused_variables))]
     challenge_id: Option<&str>
 ) -> std::io::Result<bool> {
     match credential {
@@ -758,6 +760,7 @@ mod tests {
 
         match confirmation.authorization_method {
             Credential::Password(password) => assert_eq!(password.as_str(), "swordfish"),
+            #[allow(unreachable_patterns)]
             other => panic!("Incorrect credential: {:?}", other)
         }
         assert_eq!(confirmation.request.state.as_ref(), "10101010");