Skip to content

Commit

Permalink
chore: remove mutable methods from ClusterState
Browse files Browse the repository at this point in the history
Signed-off-by: bsbds <69835502+bsbds@users.noreply.github.com>
  • Loading branch information
bsbds committed Sep 4, 2024
1 parent eac3f74 commit e12253c
Showing 1 changed file with 0 additions and 16 deletions.
16 changes: 0 additions & 16 deletions crates/curp/src/client/cluster_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -108,20 +108,4 @@ impl ClusterState {
pub(crate) fn term(&self) -> u64 {
self.term
}

/// Updates the current leader
pub(crate) fn update_leader(&mut self, leader: ServerId, term: u64) {
self.leader = leader;
self.term = term;
}

/// Updates the cluster
pub(crate) fn update_cluster(
&mut self,
cluster_version: u64,
connects: HashMap<ServerId, Arc<dyn ConnectApi>>,
) {
self.cluster_version = cluster_version;
self.connects = connects;
}
}

0 comments on commit e12253c

Please sign in to comment.