From a20b02bff1550f7cae13ebf12b842a67fb675853 Mon Sep 17 00:00:00 2001 From: Lewin Bormann Date: Mon, 27 Jan 2025 18:51:11 +0100 Subject: [PATCH] Fix clippy warnings --- src/authenticator.rs | 2 +- src/error.rs | 4 ++-- src/storage.rs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/authenticator.rs b/src/authenticator.rs index 4e153b4c..ed7bd8a2 100644 --- a/src/authenticator.rs +++ b/src/authenticator.rs @@ -51,7 +51,7 @@ where } struct DisplayScopes<'a, T>(&'a [T]); -impl<'a, T> fmt::Display for DisplayScopes<'a, T> +impl fmt::Display for DisplayScopes<'_, T> where T: AsRef, { diff --git a/src/error.rs b/src/error.rs index f3961c97..0db27aa7 100644 --- a/src/error.rs +++ b/src/error.rs @@ -102,7 +102,7 @@ impl From for AuthErrorCode { } } -impl<'a> From<&'a str> for AuthErrorCode { +impl From<&str> for AuthErrorCode { fn from(s: &str) -> Self { AuthErrorCode::from_string(s) } @@ -114,7 +114,7 @@ impl<'de> Deserialize<'de> for AuthErrorCode { D: serde::Deserializer<'de>, { struct V; - impl<'de> serde::de::Visitor<'de> for V { + impl serde::de::Visitor<'_> for V { type Value = AuthErrorCode; fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { f.write_str("any string") diff --git a/src/storage.rs b/src/storage.rs index 9a2af302..f4302a3a 100644 --- a/src/storage.rs +++ b/src/storage.rs @@ -62,12 +62,12 @@ pub(crate) struct ScopeSet<'a, T> { // Implement Clone manually. Auto derive fails to work correctly because we want // Clone to be implemented regardless of whether T is Clone or not. -impl<'a, T> Clone for ScopeSet<'a, T> { +impl Clone for ScopeSet<'_, T> { fn clone(&self) -> Self { *self } } -impl<'a, T> Copy for ScopeSet<'a, T> {} +impl Copy for ScopeSet<'_, T> {} impl<'a, T> ScopeSet<'a, T> where