@@ -841,7 +841,7 @@ where
return None;
}
- let index = rf.log.add(term, command);
+ let index = rf.log.add_command(term, command);
self.persister.save_state(rf.persisted_state().into());
let _ = self.new_log_entry.clone().unwrap().send(None);
@@ -81,7 +81,7 @@ impl<C> std::ops::Index<usize> for LogArray<C> {
// Mutations
impl<C> LogArray<C> {
- pub fn add(&mut self, term: Term, command: C) -> Index {
+ pub fn add_command(&mut self, term: Term, command: C) -> Index {
let index = self.len();
self.push(LogEntry {
index,