fn tick_election<S: Storage>(raft: &mut Raft<S>) {
    raft.election_elapsed += 1;
    if raft.promotable() && raft.past_election_timeout() {
        raft.election_elapsed = 0;
        let mut msg = Message::new();
        msg.set_from(raft.id);
        msg.set_field_type(MsgHup);
        raft.step(msg);
    }
}
// tick_election is run by followers and candidate after self.election_timeout
tick_election is run by followers and candidate after self.election_timeout
tick_election is run by followers and candidate after self . election_timeout
fn tick_election<S: Storage>(raft: &mut Raft<S>) {
    raft.election_elapsed += 1;
    if raft.promotable() && raft.past_election_timeout() {
        raft.election_elapsed = 0;
        let mut msg = Message::new();
        msg.set_from(raft.id);
        msg.set_field_type(MsgHup);
        raft.step(msg);
    }
}
fn tick_election < S : Storage > ( raft : & mut Raft < S > ) { raft . election_elapsed += 1 ; if raft . promotable ( ) && raft . past_election_timeout ( ) { raft . election_elapsed = 0 ; let mut msg = Message :: new ( ) ; msg . set_from ( raft . id ) ; msg . set_field_type ( MsgHup ) ; raft . step ( msg ) ; } }
tick_election is run by followers and candidate after self.election_timeout
tick_election is run by followers and candidate after self . election_timeout
raft
&mut Raft<S>