Skip to content

Commit

Permalink
chore: clippy (#5674)
Browse files Browse the repository at this point in the history
  • Loading branch information
onbjerg authored Dec 4, 2023
1 parent 270b9e0 commit caa7b92
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/consensus/auto-seal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ impl StorageInner {
/// transactions.
pub(crate) fn build_header_template(
&self,
transactions: &Vec<TransactionSigned>,
transactions: &[TransactionSigned],
chain_spec: Arc<ChainSpec>,
) -> Header {
let timestamp = SystemTime::now().duration_since(UNIX_EPOCH).unwrap_or_default().as_secs();
Expand Down
4 changes: 2 additions & 2 deletions crates/payload/builder/src/payload.rs
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ impl PayloadBuilderAttributes {

#[cfg(feature = "optimism")]
let (id, transactions) = {
let transactions = attributes
let transactions: Vec<_> = attributes
.optimism_payload_attributes
.transactions
.as_deref()
Expand Down Expand Up @@ -276,7 +276,7 @@ impl PayloadBuilderAttributes {
pub(crate) fn payload_id(
parent: &B256,
attributes: &PayloadAttributes,
#[cfg(feature = "optimism")] txs: &Vec<TransactionSigned>,
#[cfg(feature = "optimism")] txs: &[TransactionSigned],
) -> PayloadId {
use sha2::Digest;
let mut hasher = sha2::Sha256::new();
Expand Down
2 changes: 1 addition & 1 deletion crates/rpc/rpc-types/src/eth/filter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,7 @@ impl FilteredParams {
}

/// Returns `true` if the bloom matches the topics
pub fn matches_topics(bloom: Bloom, topic_filters: &Vec<BloomFilter>) -> bool {
pub fn matches_topics(bloom: Bloom, topic_filters: &[BloomFilter]) -> bool {
if topic_filters.is_empty() {
return true
}
Expand Down
2 changes: 1 addition & 1 deletion crates/storage/nippy-jar/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ where
/// Safety checks before creating and returning a [`File`] handle to write data to.
fn freeze_check(
&mut self,
columns: &Vec<impl IntoIterator<Item = ColumnResult<Vec<u8>>>>,
columns: &[impl IntoIterator<Item = ColumnResult<Vec<u8>>>],
) -> Result<File, NippyJarError> {
if columns.len() != self.columns {
return Err(NippyJarError::ColumnLenMismatch(self.columns, columns.len()))
Expand Down

0 comments on commit caa7b92

Please sign in to comment.