Skip to content

Commit

Permalink
Use into_iter() and zip()
Browse files Browse the repository at this point in the history
  • Loading branch information
moshababo committed Nov 28, 2023
1 parent 8a70f2c commit 8a577f9
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions node/actors/bft/src/testonly/ut_harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ impl UTHarness {
keys: Vec<SecretKey>,
) -> Result<(), ReplicaPrepareError> {
messages
.iter()
.enumerate()
.map(|(i, msg)| {
let signed = keys[i].sign_msg(ConsensusMsg::ReplicaPrepare(msg.clone()));
.into_iter()
.zip(keys)
.map(|(msg, key)| {
let signed = key.sign_msg(ConsensusMsg::ReplicaPrepare(msg));
self.dispatch_replica_prepare(signed)
})
.last()
Expand Down

0 comments on commit 8a577f9

Please sign in to comment.