Jing Yang %!s(int64=5) %!d(string=hai) anos
pai
achega
8219351836
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      src/lib.rs

+ 1 - 1
src/lib.rs

@@ -178,7 +178,7 @@ impl Raft {
             .max_threads(peer_size * 2)
             .build()
             .expect("Creating thread pool should not fail");
-        let peers = peers.into_iter().map(|r| Arc::new(r)).collect();
+        let peers = peers.into_iter().map(Arc::new).collect();
         let mut this = Raft {
             inner_state: Arc::new(Mutex::new(state)),
             peers,