about summary refs log tree commit diff
path: root/indieauth/src/lib.rs
diff options
context:
space:
mode:
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/"),