fn promotable(&mut self) -> bool {
        if let Some(progress) = self.prs.progress.get(&self.id) {
            !progress.is_learner && !self.raft_log.has_pending_snapshot()
        } else {
            false
        }
    }
// promotable indicates whether state machine can be promoted to leader.
// which is true when its own id is in progress list.
promotable indicates whether state machine can be promoted to leader.
which is true when its own id is in progress list.
promotable indicates whether state machine can be promoted to leader . which is true when its own id is in progress list .
fn promotable(&mut self) -> bool {
        if let Some(progress) = self.prs.progress.get(&self.id) {
            !progress.is_learner && !self.raft_log.has_pending_snapshot()
        } else {
            false
        }
    }
fn promotable ( & mut self ) -> bool { if let Some ( progress ) = self . prs . progress . get ( & self . id ) { ! progress . is_learner && ! self . raft_log . has_pending_snapshot ( ) } else { false } }
promotable indicates whether state machine can be promoted to leader.
promotable indicates whether state machine can be promoted to leader .
&mut self