Pārlūkot izejas kodu

Minor cosmetic change for readability.

Jing Yang 2 gadi atpakaļ
vecāks
revīzija
18699fdd34
1 mainītis faili ar 1 papildinājumiem un 1 dzēšanām
  1. 1 1
      raft/src/process_append_entries.rs

+ 1 - 1
raft/src/process_append_entries.rs

@@ -75,7 +75,7 @@ impl<Command: serde::Serialize> Raft<Command> {
         let mut first_mismatch = rf.log.end();
         for (i, entry) in args.entries.into_iter().enumerate() {
             let index = i + args.prev_log_index + 1;
-            if rf.log.end() > index {
+            if index < rf.log.end() {
                 if rf.log.at(index).term != entry.term {
                     check_or_record!(
                         index > rf.commit_index,