Skip to content

Commit

Permalink
chore: clippy (#834)
Browse files Browse the repository at this point in the history
  • Loading branch information
DaniPopes authored Dec 27, 2024
1 parent 0ad9567 commit 8011815
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion crates/dyn-abi/src/dynamic/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ impl DecodedEvent {
self.selector
.iter()
.copied()
.chain(self.indexed.iter().flat_map(DynSolValue::as_word).map(B256::from))
.chain(self.indexed.iter().flat_map(DynSolValue::as_word))
.collect(),
DynSolValue::encode_seq(&self.body).into(),
)
Expand Down
1 change: 1 addition & 0 deletions crates/json-abi/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#![cfg_attr(not(test), warn(unused_crate_dependencies))]
#![cfg_attr(not(feature = "std"), no_std)]
#![cfg_attr(docsrs, feature(doc_cfg, doc_auto_cfg))]
#![allow(clippy::literal_string_with_formatting_args)] // TODO: https://github.com/rust-lang/rust-clippy/issues/13885

#[macro_use]
#[allow(unused_imports)]
Expand Down
2 changes: 1 addition & 1 deletion crates/json-abi/src/param.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ impl<'de> Deserialize<'de> for EventParam {
name: inner.name,
ty: inner.ty,
indexed: inner.indexed.unwrap_or(false),
internal_type: inner.internal_type.map(Into::into),
internal_type: inner.internal_type,
components: inner.components,
})
})
Expand Down
2 changes: 1 addition & 1 deletion crates/primitives/src/bits/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -320,7 +320,7 @@ impl Address {
for (i, out) in buf[2..].iter_mut().enumerate() {
// This is made branchless for easier vectorization.
// Get the i-th nibble of the hash.
let hash_nibble = hash[i / 2] >> (4 * (1 - i % 2)) & 0xf;
let hash_nibble = (hash[i / 2] >> (4 * (1 - i % 2))) & 0xf;
// Make the character ASCII uppercase if it's a hex letter and the hash nibble is >= 8.
// We can use a simpler comparison for checking if the character is a hex letter because
// we know `out` is a hex-encoded character (`b'0'..=b'9' | b'a'..=b'f'`).
Expand Down
2 changes: 1 addition & 1 deletion crates/primitives/src/postgres.rs
Original file line number Diff line number Diff line change
Expand Up @@ -260,7 +260,7 @@ impl<'a, const BITS: usize, const LIMBS: usize> FromSql<'a> for Signed<BITS, LIM
let mut raw = raw.to_owned();
if padding > 0 {
for i in (1..raw.len()).rev() {
raw[i] = raw[i] >> padding | raw[i - 1] << (8 - padding);
raw[i] = (raw[i] >> padding) | (raw[i - 1] << (8 - padding));
}
raw[0] >>= padding;
}
Expand Down

0 comments on commit 8011815

Please sign in to comment.