Skip to content

Commit

Permalink
chore: simply code
Browse files Browse the repository at this point in the history
  • Loading branch information
fengjiachun committed Apr 12, 2024
1 parent 6a8308e commit daa2879
Showing 1 changed file with 2 additions and 10 deletions.
12 changes: 2 additions & 10 deletions src/meta-srv/src/election/etcd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -105,19 +105,11 @@ impl EtcdElection {
}

fn election_key(&self) -> String {
if self.store_key_prefix.is_empty() {
ELECTION_KEY.to_string()
} else {
format!("{}{}", self.store_key_prefix, ELECTION_KEY)
}
format!("{}{}", self.store_key_prefix, ELECTION_KEY)
}

fn candidate_root(&self) -> String {
if self.store_key_prefix.is_empty() {
CANDIDATES_ROOT.to_string()
} else {
format!("{}{}", self.store_key_prefix, CANDIDATES_ROOT)
}
format!("{}{}", self.store_key_prefix, CANDIDATES_ROOT)
}

fn candidate_key(&self) -> String {
Expand Down

0 comments on commit daa2879

Please sign in to comment.