Skip to content

Commit d3acacd

Browse files
committed
remove: uneeded clones
1 parent 188cd6a commit d3acacd

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

adapter/src/ethereum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -491,7 +491,7 @@ mod test {
491491
let signature2 = "0x9fa5852041b9818021323aff8260624fd6998c52c95d9ad5036e0db6f2bf2b2d48a188ec1d638581ff56b0a2ecceca6d3880fc65030558bd8f68b154e7ebf80f1b";
492492
let message2 = "1648231285e69677531ffe70719f67a07f3d4393b8425a5a1c84b0c72434c77b";
493493

494-
let _verify2 = eth_adapter
494+
let verify2 = eth_adapter
495495
.verify(
496496
&ValidatorId::try_from("ce07CbB7e054514D590a0262C93070D838bFBA2e")
497497
.expect("Failed to parse id"),

validator_worker/src/follower.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -140,7 +140,7 @@ async fn on_new_state<'a, A: Adapter + 'static>(
140140
let signature = iface.adapter.sign(&new_state.state_root)?;
141141
let health_threshold = u64::from(iface.config.health_threshold_promilles);
142142
let is_healthy = health >= health_threshold;
143-
let exhausted = proposed_balances.clone().values().sum::<BigNum>() == iface.channel.deposit_amount;
143+
let exhausted = proposed_balances.values().sum::<BigNum>() == iface.channel.deposit_amount;
144144

145145
let propagation_result = iface
146146
.propagate(&[&MessageTypes::ApproveState(ApproveState {

validator_worker/src/leader.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ async fn on_new_accounting<A: Adapter + 'static>(
4949

5050
let signature = iface.adapter.sign(&state_root)?;
5151

52-
let exhausted = new_accounting.balances.clone().values().sum::<BigNum>() == iface.channel.deposit_amount;
52+
let exhausted = new_accounting.balances.values().sum::<BigNum>() == iface.channel.deposit_amount;
5353

5454
let propagation_results = iface
5555
.propagate(&[&MessageTypes::NewState(NewState {

0 commit comments

Comments
 (0)