Skip to content

Commit

Permalink
Chore: refine variable names
Browse files Browse the repository at this point in the history
  • Loading branch information
drmingdrmer committed Jan 28, 2025
1 parent a221894 commit 133e59c
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions openraft/src/engine/handler/following_handler/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -68,11 +68,11 @@ where C: RaftTypeConfig
entries.display(),
);

if let Some(x) = entries.first() {
debug_assert!(x.get_log_id().index() == prev_log_id.next_index());
if let Some(first_ent) = entries.first() {
debug_assert!(first_ent.get_log_id().index() == prev_log_id.next_index());
}

let last_log_id = entries.last().map(|x| x.get_log_id().clone());
let last_log_id = entries.last().map(|ent| ent.get_log_id().clone());
let last_log_id = std::cmp::max(prev_log_id, last_log_id);

let prev_accepted = self.state.accept_io(IOId::new_log_io(self.leader_vote.clone(), last_log_id.clone()));
Expand Down

0 comments on commit 133e59c

Please sign in to comment.