Don't clone before borrowing

Clippy told us to change function parameters to references, but
wasn't able to then tell us that the clone() before borrowing
was superfluous. This patch removes those by hand.

No expectation of a performance improvement here, since we were
just cloning reference counts. Just removes a bunch of noise.
This commit is contained in:
Greg Fitzgerald
2018-07-13 13:32:20 -06:00
parent 8cf5620b87
commit 28af9a39b4
9 changed files with 28 additions and 23 deletions

View File

@@ -36,7 +36,7 @@ fn converge(leader: &NodeInfo, num_nodes: usize) -> Vec<NodeInfo> {
let spy_ref = Arc::new(RwLock::new(spy_crdt));
let spy_window = default_window();
let ncp = Ncp::new(
&spy_ref.clone(),
&spy_ref,
spy_window,
spy.sockets.gossip,
spy.sockets.gossip_send,