From 3ebbda747c6e6673acd5703149d48d4785c5964a Mon Sep 17 00:00:00 2001 From: "Kevin P. Fleming" Date: Wed, 29 May 2024 14:42:14 -0400 Subject: [PATCH] Apply 'clippy' fixes. --- src/jwt.rs | 4 ++-- src/pkce.rs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/jwt.rs b/src/jwt.rs index 0f80049..6e9c9f3 100644 --- a/src/jwt.rs +++ b/src/jwt.rs @@ -35,8 +35,8 @@ pub fn validate_token_rs256( .find(|&k| k.key_id == key_id) .unwrap(); // Reconstruct the public key used to sign the token. - let modulus = CUSTOM_ENGINE.decode(&key_metadata.modulus)?; - let exponent = CUSTOM_ENGINE.decode(&key_metadata.exponent)?; + let modulus = CUSTOM_ENGINE.decode(key_metadata.modulus)?; + let exponent = CUSTOM_ENGINE.decode(key_metadata.exponent)?; let public_key = RS256PublicKey::from_components(&modulus, &exponent)?; // Verify the token's claims. // Custom claims are also supported – see https://docs.rs/jwt-simple/0.9.3/jwt_simple/index.html#custom-claims diff --git a/src/pkce.rs b/src/pkce.rs index 1ea43c9..791cad2 100644 --- a/src/pkce.rs +++ b/src/pkce.rs @@ -32,7 +32,7 @@ impl Pkce { pub fn new(code_challenge_method: &str) -> Self { let verifier = rand_chars(Self::LENGTH); let challenge = match code_challenge_method { - "S256" => CUSTOM_ENGINE.encode(&Hash::hash(verifier.as_bytes())), + "S256" => CUSTOM_ENGINE.encode(Hash::hash(verifier.as_bytes())), _ => CUSTOM_ENGINE.encode(&verifier), }; Self {