Skip to content

Commit

Permalink
Make clippy happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
timothee-haudebourg committed Sep 16, 2024
1 parent 9b630d0 commit a888311
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
5 changes: 3 additions & 2 deletions crates/claims/crates/jws/src/compact/bytes.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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()
}
Expand Down Expand Up @@ -185,8 +186,8 @@ impl JwsSlice {
Ok(DecodedJws::new(
DecodedSigningBytes {
bytes: Cow::Borrowed(signing_bytes),
header: header,
payload: payload,
header,
payload,
},
signature,
))
Expand Down
1 change: 1 addition & 0 deletions crates/claims/crates/jwt/src/claims/mixed/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,7 @@ impl JWTClaimsBuilder {
self.set(value)
}

#[allow(clippy::should_implement_trait)]
pub fn sub(self, value: impl TryIntoClaim<Subject>) -> Self {
self.set(value)
}
Expand Down
2 changes: 1 addition & 1 deletion crates/claims/crates/sd-jwt/src/conceal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
3 changes: 1 addition & 2 deletions crates/status/src/impl/bitstring_status_list/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -532,9 +532,8 @@ impl<'a> Iterator for BitStringIter<'a> {
type Item = u8;

fn next(&mut self) -> Option<Self::Item> {
self.bit_string.get(self.index).map(|status| {
self.bit_string.get(self.index).inspect(|_| {
self.index += 1;
status
})
}
}
Expand Down
3 changes: 1 addition & 2 deletions crates/status/src/impl/token_status_list/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -490,9 +490,8 @@ impl<'a> Iterator for BitStringIter<'a> {
type Item = u8;

fn next(&mut self) -> Option<Self::Item> {
self.bit_string.get(self.index).map(|status| {
self.bit_string.get(self.index).inspect(|_| {
self.index += 1;
status
})
}
}
Expand Down

0 comments on commit a888311

Please sign in to comment.