diff options
author | Alex Auvolat <alex@adnab.me> | 2020-04-21 17:08:42 +0000 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2020-04-21 17:08:42 +0000 |
commit | ec59e896c6cf405a0e52392ebb8619f26a367968 (patch) | |
tree | 4065518f40a7aa40a6c13506be43706061e795e8 /src/main.rs | |
parent | 8915224966e41195bd5844d9df29a3f0c7d7d6ae (diff) | |
download | garage-ec59e896c6cf405a0e52392ebb8619f26a367968.tar.gz garage-ec59e896c6cf405a0e52392ebb8619f26a367968.zip |
Make UUID & Hash Copy and remove some .clone() noise
Diffstat (limited to 'src/main.rs')
-rw-r--r-- | src/main.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main.rs b/src/main.rs index 6ecf1024..e0ae7db7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -299,7 +299,7 @@ async fn cmd_status(rpc_cli: RpcAddrClient<Message>, rpc_host: SocketAddr) -> Re } } - let status_keys = status.iter().map(|x| x.id.clone()).collect::<HashSet<_>>(); + let status_keys = status.iter().map(|x| x.id).collect::<HashSet<_>>(); if config .members .iter() @@ -347,7 +347,7 @@ async fn cmd_configure( let mut candidates = vec![]; for adv in status.iter() { if hex::encode(&adv.id).starts_with(&args.node_id) { - candidates.push(adv.id.clone()); + candidates.push(adv.id); } } if candidates.len() != 1 { @@ -401,7 +401,7 @@ async fn cmd_remove( let mut candidates = vec![]; for (key, _) in config.members.iter() { if hex::encode(key).starts_with(&args.node_id) { - candidates.push(key.clone()); + candidates.push(*key); } } if candidates.len() != 1 { |