fn next_ents(mut raft: Raft<SafeMemStorage>, s: &mut SafeMemStorage) -> Vec<Entry> {
    // transfer all unstable entries to "stable" storage.
    s.wl().append(raft.raft_log.unstable_entries().to_vec());
    raft.raft_log.stable_to(raft.raft_log.last_index(), raft.raft_log.last_term());

    let ents = raft.raft_log.next_ents();
    raft.raft_log.applied_to(raft.raft_log.committed);
    return ents;
}
// Returns the appliable entries and updates the applied index
Returns the appliable entries and updates the applied index
Returns the appliable entries and updates the applied index
fn next_ents(mut raft: Raft<SafeMemStorage>, s: &mut SafeMemStorage) -> Vec<Entry> {
    // transfer all unstable entries to "stable" storage.
    s.wl().append(raft.raft_log.unstable_entries().to_vec());
    raft.raft_log.stable_to(raft.raft_log.last_index(), raft.raft_log.last_term());
    let ents = raft.raft_log.next_ents();
    raft.raft_log.applied_to(raft.raft_log.committed);
    return ents;
}
fn next_ents ( mut raft : Raft < SafeMemStorage > , s : & mut SafeMemStorage ) -> Vec < Entry > { // transfer all unstable entries to "stable" storage. s . wl ( ) . append ( raft . raft_log . unstable_entries ( ) . to_vec ( ) ) ; raft . raft_log . stable_to ( raft . raft_log . last_index ( ) , raft . raft_log . last_term ( ) ) ; let ents = raft . raft_log . next_ents ( ) ; raft . raft_log . applied_to ( raft . raft_log . committed ) ; return ents ; }
Returns the appliable entries and updates the applied index
Returns the appliable entries and updates the applied index
raft
Raft<SafeMemStorage>
s
&mut SafeMemStorage