From 8c134dfc89423acfc4d208d41486e858d2e06846 Mon Sep 17 00:00:00 2001 From: Alexander Korolev Date: Sun, 22 Dec 2024 10:24:50 +0100 Subject: [PATCH] clippy warnings --- src/deserializers.rs | 5 ++--- src/error.rs | 5 +---- 2 files changed, 3 insertions(+), 7 deletions(-) diff --git a/src/deserializers.rs b/src/deserializers.rs index de83c19..ec7c052 100644 --- a/src/deserializers.rs +++ b/src/deserializers.rs @@ -1,6 +1,5 @@ use de::Visitor; -use serde::de; -use serde::Deserializer; +use serde::{de, Deserializer}; pub fn bool_from_str_or_bool<'de, D>(deserializer: D) -> Result where @@ -11,7 +10,7 @@ where struct BoolOrStringVisitor; -impl<'de> Visitor<'de> for BoolOrStringVisitor { +impl Visitor<'_> for BoolOrStringVisitor { type Value = bool; fn expecting(&self, formatter: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/src/error.rs b/src/error.rs index 8ca0bcc..3dbabb4 100644 --- a/src/error.rs +++ b/src/error.rs @@ -72,7 +72,7 @@ pub enum OAuth2ErrorCode { Unrecognized(String), } -impl<'a> From<&'a str> for OAuth2ErrorCode { +impl From<&str> for OAuth2ErrorCode { fn from(s: &str) -> OAuth2ErrorCode { match s { "invalid_request" => OAuth2ErrorCode::InvalidRequest, @@ -99,9 +99,6 @@ pub enum ClientError { /// JSON error. Json(serde_json::Error), - /// Response parse error. - // Parse(ParseError), - /// OAuth 2.0 error. OAuth2(OAuth2Error),