Skip to content

Commit be46f9b

Browse files
tommytroentronghnkimtore
committed
refactor: remove needless borrow
* after running cargo clippy we got: * this expression creates a reference which is immediately dereferenced by the compiler Co-authored-by: tronghn <[email protected]> Co-authored-by: kimtore <[email protected]>
1 parent 7529f95 commit be46f9b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/jwks.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ impl Jwks {
7171
validation.set_issuer(&[self.issuer.clone()]);
7272
validation.validate_nbf = true;
7373

74-
let key_id = jwt::decode_header(&token)
74+
let key_id = jwt::decode_header(token)
7575
.map_err(Error::InvalidTokenHeader)?
7676
.kid.ok_or(Error::MissingKeyID)?
7777
;
@@ -85,7 +85,7 @@ impl Jwks {
8585
Some(key) => key,
8686
};
8787

88-
Ok(jwt::decode::<HashMap<String, Value>>(&token, &signing_key.key.to_decoding_key(), &validation)
88+
Ok(jwt::decode::<HashMap<String, Value>>(token, &signing_key.key.to_decoding_key(), &validation)
8989
.map_err(InvalidToken)?
9090
.claims
9191
)

0 commit comments

Comments
 (0)