소스 검색

More clippy changes.

Jing Yang 5 년 전
부모
커밋
275d0bedda
1개의 변경된 파일2개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 1
      src/lib.rs

+ 2 - 1
src/lib.rs

@@ -195,6 +195,7 @@ impl Raft {
         let mut rf = self.inner_state.lock();
 
         let term = rf.current_term;
+        #[allow(clippy::comparison_chain)]
         if args.term < term {
             return RequestVoteReply {
                 term,
@@ -768,7 +769,7 @@ impl Raft {
             .send(None)
             .expect("Sending to new log entry queue should never fail.");
 
-        return Some((term, index));
+        Some((term, index))
     }
 
     pub fn kill(mut self) {