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/table_fullcopy.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/table_fullcopy.rs')
-rw-r--r-- | src/table_fullcopy.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/table_fullcopy.rs b/src/table_fullcopy.rs index d5194d55..2fcf56db 100644 --- a/src/table_fullcopy.rs +++ b/src/table_fullcopy.rs @@ -38,12 +38,12 @@ impl TableFullReplication { // Recalculate neighbors let ring = system.ring.borrow().clone(); - let my_id = system.id.clone(); + let my_id = system.id; let mut nodes = vec![]; for (node, _) in ring.config.members.iter() { let node_ranking = hash(&[node.as_slice(), my_id.as_slice()].concat()); - nodes.push((node.clone(), node_ranking)); + nodes.push((*node, node_ranking)); } nodes.sort_by(|(_, rank1), (_, rank2)| rank1.cmp(rank2)); let mut neighbors = nodes @@ -69,7 +69,7 @@ impl TableReplication for TableFullReplication { // Inconvenient: only suitable to reasonably small tables fn read_nodes(&self, _hash: &Hash, system: &System) -> Vec<UUID> { - vec![system.id.clone()] + vec![system.id] } fn read_quorum(&self) -> usize { 1 |