Skip to content

Commit

Permalink
clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kilork committed Dec 22, 2024
1 parent 40ccc86 commit 8c134df
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
5 changes: 2 additions & 3 deletions src/deserializers.rs
Original file line number Diff line number Diff line change
@@ -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<bool, D::Error>
where
Expand All @@ -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 {
Expand Down
5 changes: 1 addition & 4 deletions src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -99,9 +99,6 @@ pub enum ClientError {
/// JSON error.
Json(serde_json::Error),

/// Response parse error.
// Parse(ParseError),

/// OAuth 2.0 error.
OAuth2(OAuth2Error),

Expand Down

0 comments on commit 8c134df

Please sign in to comment.