Skip to content

Commit

Permalink
chore(test): use collect void realloc (paradigmxyz#11669)
Browse files Browse the repository at this point in the history
  • Loading branch information
nkysg authored Oct 11, 2024
1 parent 6a56ae7 commit ad2a2f2
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions crates/transaction-pool/src/test_utils/mock.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1338,10 +1338,8 @@ impl MockTransactionDistribution {
nonce_range: Range<u64>,
rng: &mut impl rand::Rng,
) -> MockTransactionSet {
let mut txs = Vec::new();
for nonce in nonce_range {
txs.push(self.tx(nonce, rng).with_sender(sender));
}
let txs =
nonce_range.map(|nonce| self.tx(nonce, rng).with_sender(sender)).collect::<Vec<_>>();
MockTransactionSet::new(txs)
}

Expand Down

0 comments on commit ad2a2f2

Please sign in to comment.