about summary refs log tree commit diff
path: root/indieauth/src/lib.rs
diff options
context:
space:
mode:
authorVika <vika@fireburn.ru>2024-08-04 22:08:48 +0300
committerVika <vika@fireburn.ru>2024-08-17 16:05:41 +0300
commitf185df030530ae52fcb60b4cc958ca98da8cfaa1 (patch)
tree868d6f7409294d4f9aa80ec790b6ec8312288354 /indieauth/src/lib.rs
parent6d0df0fe7caebc44e9f05058c7b4cb9b6fd97ed9 (diff)
kittybox-indieauth: small code cleanups
Diffstat (limited to 'indieauth/src/lib.rs')
-rw-r--r--indieauth/src/lib.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/indieauth/src/lib.rs b/indieauth/src/lib.rs
index bbabe1f..ce0ef9f 100644
--- a/indieauth/src/lib.rs
+++ b/indieauth/src/lib.rs
@@ -265,6 +265,10 @@ impl axum_core::response::IntoResponse for Profile {
 /// it hasn't been tampered with.
 #[derive(Clone, Debug, PartialEq, Eq, Deserialize, Serialize)]
 pub struct State(String);
+
+// Default doesn't make sense semantically, as there is not an
+// identity value.
+#[allow(clippy::new_without_default)]
 impl State {
     /// Generate a random state string of 128 bytes in length.
     pub fn new() -> Self {
@@ -904,7 +908,7 @@ mod tests {
             code_verifier: PKCEVerifier("helloworld".to_string()),
             code: "hithere".to_owned()
         };
-        let serialized = serde_urlencoded::to_string(&[
+        let serialized = serde_urlencoded::to_string([
             ("grant_type", "authorization_code"),
             ("code", "hithere"),
             ("client_id", "https://kittybox.fireburn.ru/"),