chore: clippy (#5674)

This commit is contained in:
Bjerg
2023-12-04 13:25:20 +01:00
committed by GitHub
parent 270b9e0f69
commit caa7b92518
4 changed files with 5 additions and 5 deletions

View File

@ -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();

View File

@ -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()
@ -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();

View File

@ -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
}

View File

@ -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()))