From f185df030530ae52fcb60b4cc958ca98da8cfaa1 Mon Sep 17 00:00:00 2001 From: Vika Date: Sun, 4 Aug 2024 22:08:48 +0300 Subject: kittybox-indieauth: small code cleanups --- indieauth/src/lib.rs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'indieauth/src/lib.rs') 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/"), -- cgit 1.4.1