Skip to content

Commit

Permalink
refactor: fix clippy warnings for Rust 1.44
Browse files Browse the repository at this point in the history
  • Loading branch information
tmpolaczyk committed Jun 5, 2020
1 parent 019e9fe commit da19910
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion bridges/ethereum/src/actors/claim_and_post.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ fn try_to_claim_local_query(

log::debug!(
"\nPoE: {:?}\nWitnet Public Key: {:?}\nSignature Address: {:?}",
poe, witnet_pk.clone(), sign_addr
poe, witnet_pk, sign_addr
);
log::info!("[{}] Checking eligibility for claiming dr", dr_id);

Expand Down
2 changes: 1 addition & 1 deletion node/src/actors/chain_manager/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1366,7 +1366,7 @@ mod tests {
pkh: pk1.pkh(),
..Default::default()
}];
ta_tx.slashed_witnesses = vec![pk2.clone().pkh()];
ta_tx.slashed_witnesses = vec![pk2.pkh()];

dr_pool
.add_data_request(1, dr_tx, &Hash::default())
Expand Down
2 changes: 1 addition & 1 deletion node/src/actors/epoch_manager/handlers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ impl Handler<SubscribeEpoch> for EpochManager {
// Store subscription to target checkpoint
self.subscriptions_epoch
.entry(msg.checkpoint)
.or_insert_with(|| vec![])
.or_default()
.push(msg.notification);
}
}
Expand Down
2 changes: 1 addition & 1 deletion validations/src/validations.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1292,7 +1292,7 @@ fn increment_witnesses_counter<S: ::std::hash::BuildHasher>(
k: &Hash,
rf: u32,
) {
hm.entry(k.clone())
hm.entry(*k)
.or_insert(WitnessesCount {
current: 0,
target: rf,
Expand Down
2 changes: 1 addition & 1 deletion wallet/src/actors/worker/methods.rs
Original file line number Diff line number Diff line change
Expand Up @@ -818,7 +818,7 @@ impl Worker {
checkpoint: block.block_header.beacon.checkpoint,
hash_prev_block: block.hash(),
};
self.node.update_last_beacon(block_own_beacon.clone());
self.node.update_last_beacon(block_own_beacon);

// NOTE: Possible enhancement.
// Maybe is a good idea to use a shared reference Arc instead of cloning this vector of txns
Expand Down
2 changes: 1 addition & 1 deletion wallet/src/repository/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1092,7 +1092,7 @@ fn build_tally_report(
reveal.in_consensus = false;
} else {
reveals.insert(
pkh.clone(),
*pkh,
model::Reveal {
value: types::RadonTypes::from(
RadonError::try_from(types::RadError::NoReveals).unwrap(),
Expand Down

0 comments on commit da19910

Please sign in to comment.