mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-24 11:36:31 +00:00
Make UUID & Hash Copy and remove some .clone() noise
This commit is contained in:
+2
-2
@@ -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<_>>();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user