aboutsummaryrefslogtreecommitdiff
path: root/src/rpc_client.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2020-04-21 17:08:42 +0000
committerAlex Auvolat <alex@adnab.me>2020-04-21 17:08:42 +0000
commitec59e896c6cf405a0e52392ebb8619f26a367968 (patch)
tree4065518f40a7aa40a6c13506be43706061e795e8 /src/rpc_client.rs
parent8915224966e41195bd5844d9df29a3f0c7d7d6ae (diff)
downloadgarage-ec59e896c6cf405a0e52392ebb8619f26a367968.tar.gz
garage-ec59e896c6cf405a0e52392ebb8619f26a367968.zip
Make UUID & Hash Copy and remove some .clone() noise
Diffstat (limited to 'src/rpc_client.rs')
-rw-r--r--src/rpc_client.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc_client.rs b/src/rpc_client.rs
index 2b994402..4a065264 100644
--- a/src/rpc_client.rs
+++ b/src/rpc_client.rs
@@ -53,7 +53,7 @@ impl<M: RpcMessage + 'static> RpcClient<M> {
let addr = {
let status = self.status.borrow().clone();
match status.nodes.get(to.borrow()) {
- Some(status) => status.addr.clone(),
+ Some(status) => status.addr,
None => {
return Err(Error::Message(format!(
"Peer ID not found: {:?}",
@@ -93,7 +93,7 @@ impl<M: RpcMessage + 'static> RpcClient<M> {
.map(|to| {
let self2 = self.clone();
let msg = msg.clone();
- async move { self2.call(to.clone(), msg, timeout).await }
+ async move { self2.call(to, msg, timeout).await }
})
.collect::<FuturesUnordered<_>>();