Browse Source

Address clippy warnings.

Jing Yang 3 years ago
parent
commit
89d892c17c
2 changed files with 2 additions and 3 deletions
  1. 1 1
      src/daemon_env.rs
  2. 1 2
      src/raft.rs

+ 1 - 1
src/daemon_env.rs

@@ -14,7 +14,7 @@ use crate::{IndexTerm, Peer, RaftState, State, Term};
 macro_rules! check_or_record {
     ($condition:expr, $error_kind:expr, $message:expr, $rf:expr) => {
         if !$condition {
-            crate::daemon_env::ThreadEnv::upgrade().record_error(
+            $crate::daemon_env::ThreadEnv::upgrade().record_error(
                 $error_kind,
                 $message,
                 $rf,

+ 1 - 2
src/raft.rs

@@ -161,8 +161,7 @@ impl<Command: ReplicableCommand> Raft<Command> {
         let index = rf.log.add_command(term, command);
         self.persister.save_state(rf.persisted_state().into());
 
-        // Several attempts have been made to remove the unwrap below.
-        let _ = self.sync_log_entries_comms.update_followers(index);
+        self.sync_log_entries_comms.update_followers(index);
 
         log::info!("{:?} started new entry at {} {:?}", self.me, index, term);
         Some(IndexTerm::pack(index, term))