Skip to content

Commit

Permalink
ClusterData: Remove all_nodes variable in new()
Browse files Browse the repository at this point in the history
This variable was unused, probably some leftover. It's interesting that
we didn't get any warnings about it not being used (no reads, it was
only written).
  • Loading branch information
Lorak-mmk committed May 1, 2024
1 parent b9fafd4 commit 1edd11e
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions scylla/src/transport/cluster.rs
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,6 @@ impl ClusterData {
HashMap::with_capacity(metadata.peers.len());
let mut ring: Vec<(Token, Arc<Node>)> = Vec::new();
let mut datacenters: HashMap<String, Datacenter> = HashMap::new();
let mut all_nodes: Vec<Arc<Node>> = Vec::with_capacity(metadata.peers.len());

for peer in metadata.peers {
// Take existing Arc<Node> if possible, otherwise create new one
Expand Down Expand Up @@ -344,8 +343,6 @@ impl ClusterData {
for token in peer_tokens {
ring.push((token, node.clone()));
}

all_nodes.push(node);
}

Self::update_rack_count(&mut datacenters);
Expand Down

0 comments on commit 1edd11e

Please sign in to comment.