diff --git a/crates/claims/crates/jws/src/compact/bytes.rs b/crates/claims/crates/jws/src/compact/bytes.rs index 2707b3d63..2a5737141 100644 --- a/crates/claims/crates/jws/src/compact/bytes.rs +++ b/crates/claims/crates/jws/src/compact/bytes.rs @@ -117,6 +117,7 @@ impl JwsSlice { } } + #[allow(clippy::len_without_is_empty)] // A JWS slice cannot be empty. pub fn len(&self) -> usize { self.0.len() } @@ -185,8 +186,8 @@ impl JwsSlice { Ok(DecodedJws::new( DecodedSigningBytes { bytes: Cow::Borrowed(signing_bytes), - header: header, - payload: payload, + header, + payload, }, signature, )) diff --git a/crates/claims/crates/jwt/src/claims/mixed/mod.rs b/crates/claims/crates/jwt/src/claims/mixed/mod.rs index deae644b9..80aa2f8eb 100644 --- a/crates/claims/crates/jwt/src/claims/mixed/mod.rs +++ b/crates/claims/crates/jwt/src/claims/mixed/mod.rs @@ -128,6 +128,7 @@ impl JWTClaimsBuilder { self.set(value) } + #[allow(clippy::should_implement_trait)] pub fn sub(self, value: impl TryIntoClaim) -> Self { self.set(value) } diff --git a/crates/claims/crates/sd-jwt/src/conceal.rs b/crates/claims/crates/sd-jwt/src/conceal.rs index 0893dca3e..2820154a9 100644 --- a/crates/claims/crates/sd-jwt/src/conceal.rs +++ b/crates/claims/crates/sd-jwt/src/conceal.rs @@ -151,7 +151,7 @@ impl SdJwtPayload { let mut sorted_pointers: Vec<_> = pointers.iter().map(Borrow::borrow).collect(); sorted_pointers.sort_unstable(); - for pointer in pointers.into_iter().rev() { + for pointer in pointers.iter().rev() { disclosures.push(conceal_object_at( &mut claims, &mut rng, diff --git a/crates/status/src/impl/bitstring_status_list/mod.rs b/crates/status/src/impl/bitstring_status_list/mod.rs index 5cca39a4b..c4f4e722a 100644 --- a/crates/status/src/impl/bitstring_status_list/mod.rs +++ b/crates/status/src/impl/bitstring_status_list/mod.rs @@ -532,9 +532,8 @@ impl<'a> Iterator for BitStringIter<'a> { type Item = u8; fn next(&mut self) -> Option { - self.bit_string.get(self.index).map(|status| { + self.bit_string.get(self.index).inspect(|_| { self.index += 1; - status }) } } diff --git a/crates/status/src/impl/token_status_list/mod.rs b/crates/status/src/impl/token_status_list/mod.rs index e5acfba2c..b66367990 100644 --- a/crates/status/src/impl/token_status_list/mod.rs +++ b/crates/status/src/impl/token_status_list/mod.rs @@ -490,9 +490,8 @@ impl<'a> Iterator for BitStringIter<'a> { type Item = u8; fn next(&mut self) -> Option { - self.bit_string.get(self.index).map(|status| { + self.bit_string.get(self.index).inspect(|_| { self.index += 1; - status }) } }