Skip to content

Commit

Permalink
Fix clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
dermesser committed Jan 27, 2025
1 parent fb1a59c commit a20b02b
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/authenticator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ where
}

struct DisplayScopes<'a, T>(&'a [T]);
impl<'a, T> fmt::Display for DisplayScopes<'a, T>
impl<T> fmt::Display for DisplayScopes<'_, T>
where
T: AsRef<str>,
{
Expand Down
4 changes: 2 additions & 2 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ impl From<String> for AuthErrorCode {
}
}

impl<'a> From<&'a str> for AuthErrorCode {
impl From<&str> for AuthErrorCode {
fn from(s: &str) -> Self {
AuthErrorCode::from_string(s)
}
Expand All @@ -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")
Expand Down
4 changes: 2 additions & 2 deletions src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<T> Clone for ScopeSet<'_, T> {
fn clone(&self) -> Self {
*self
}
}
impl<'a, T> Copy for ScopeSet<'a, T> {}
impl<T> Copy for ScopeSet<'_, T> {}

impl<'a, T> ScopeSet<'a, T>
where
Expand Down

0 comments on commit a20b02b

Please sign in to comment.