Make UUID & Hash Copy and remove some .clone() noise

This commit is contained in:
Alex Auvolat
2020-04-21 17:08:42 +00:00
parent 8915224966
commit ec59e896c6
12 changed files with 64 additions and 80 deletions
+2 -2
View File
@@ -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<_>>();