Skip to content

Commit

Permalink
Update crates/network-primitives/src/block.rs
Browse files Browse the repository at this point in the history
Co-authored-by: DaniPopes <[email protected]>
  • Loading branch information
mattsse and DaniPopes authored Dec 27, 2024
1 parent e329796 commit 63569ef
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/network-primitives/src/block.rs
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ impl<T> BlockTransactions<T> {

impl<T: TransactionResponse> BlockTransactions<T> {
/// Creates a new [`BlockTransactions::Hashes`] variant from the given iterator of transactions.
pub fn new_hashes(txs: impl IntoIterator<Item = T>) -> Self {
Self::Hashes(txs.into_iter().map(|tx| tx.tx_hash()).collect())
pub fn new_hashes(txs: impl IntoIterator<Item = impl AsRef<T>>) -> Self {
Self::Hashes(txs.into_iter().map(|tx| tx.as_ref().tx_hash()).collect())
}

/// Converts `self` into `Hashes`.
Expand Down

0 comments on commit 63569ef

Please sign in to comment.