mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 19:09:54 +00:00
style: use clear over truncate(0) (#2338)
This commit is contained in:
@ -123,7 +123,7 @@ impl<DB: Database> Stage<DB> for SenderRecoveryStage {
|
||||
rayon::spawn(move || {
|
||||
let mut rlp_buf = Vec::with_capacity(128);
|
||||
for entry in chunk {
|
||||
rlp_buf.truncate(0);
|
||||
rlp_buf.clear();
|
||||
let _ = tx.send(recover(entry, &mut rlp_buf));
|
||||
}
|
||||
});
|
||||
|
||||
@ -99,7 +99,7 @@ impl<DB: Database> Stage<DB> for TransactionLookupStage {
|
||||
rayon::spawn(move || {
|
||||
let mut rlp_buf = Vec::with_capacity(128);
|
||||
for entry in chunk {
|
||||
rlp_buf.truncate(0);
|
||||
rlp_buf.clear();
|
||||
let _ = tx.send(calculate_hash(entry, &mut rlp_buf));
|
||||
}
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user