Update Svc election boolean fields in RenderingContext
The Svc election booleans were slightly different than the field name
on a CensusMember. This change brings them inline with each other.
@@ -79,12 +79,12 @@ impl<'a> RenderContext<'a> {
#[derive(Clone, Debug, Serialize)]
pub struct Svc<'a> {
pub group: &'a ServiceGroup,
- pub election_running: bool,
- pub election_no_quorum: bool,
- pub election_finished: bool,
- pub update_election_running: bool,
- pub update_election_no_quorum: bool,
- pub update_election_finished: bool,
+ pub election_is_running: bool,
+ pub election_is_no_quorum: bool,
+ pub election_is_finished: bool,
+ pub update_election_is_running: bool,
+ pub update_election_is_no_quorum: bool,
+ pub update_election_is_finished: bool,
pub me: SvcMember<'a>,
pub members: Vec<SvcMember<'a>>,
pub leader: Option<SvcMember<'a>>,
@@ -95,14 +95,14 @@ impl<'a> Svc<'a> {
fn new(census_group: &'a CensusGroup) -> Self {
Svc {
group: &census_group.service_group,
- election_running: census_group.election_status == ElectionStatus::ElectionInProgress,
- election_no_quorum: census_group.election_status == ElectionStatus::ElectionNoQuorum,
- election_finished: census_group.election_status == ElectionStatus::ElectionFinished,
- update_election_running: census_group.election_status ==
+ election_is_running: census_group.election_status == ElectionStatus::ElectionInProgress,
+ election_is_no_quorum: census_group.election_status == ElectionStatus::ElectionNoQuorum,
+ election_is_finished: census_group.election_status == ElectionStatus::ElectionFinished,
+ update_election_is_running: census_group.election_status ==
ElectionStatus::ElectionInProgress,
- update_election_no_quorum: census_group.election_status ==
+ update_election_is_no_quorum: census_group.election_status ==
ElectionStatus::ElectionNoQuorum,
- update_election_finished: census_group.election_status ==
+ update_election_is_finished: census_group.election_status ==
ElectionStatus::ElectionFinished,
me: SvcMember(census_group.me().expect("Missing 'me'")),
members: census_group
