Skip to content

Commit 7957131

Browse files
authored
perf: use unwrap and save 198 cycles (#17836)
1 parent f49b320 commit 7957131

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/transaction-pool/src/pool/parked.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ impl<T: ParkedOrd> ParkedPool<T> {
189189
while !self.last_sender_submission.is_empty() && limit.is_exceeded(self.len(), self.size())
190190
{
191191
// NOTE: This will not panic due to `!last_sender_transaction.is_empty()`
192-
let sender_id = self.last_sender_submission.last().expect("not empty").sender_id;
192+
let sender_id = self.last_sender_submission.last().unwrap().sender_id;
193193
let list = self.get_txs_by_sender(sender_id);
194194

195195
// Drop transactions from this sender until the pool is under limits

0 commit comments

Comments
 (0)