Jing Yang 5 жил өмнө
parent
commit
6f061ffeaf
1 өөрчлөгдсөн 3 нэмэгдсэн , 5 устгасан
  1. 3 5
      src/lib.rs

+ 3 - 5
src/lib.rs

@@ -287,10 +287,8 @@ impl Raft {
                 // across threads.
                 let rpc_client = rpc_client.clone();
                 // RPCs are started right away.
-                let one_vote = tokio::spawn(Self::request_one_vote(
-                    rpc_client,
-                    args.clone(),
-                ));
+                let one_vote =
+                    tokio::spawn(Self::request_vote(rpc_client, args.clone()));
                 // Futures must be pinned so that they have Unpin, as required
                 // by futures::future::select.
                 votes.push(one_vote);
@@ -307,7 +305,7 @@ impl Raft {
     }
 
     const REQUEST_VOTE_RETRY: usize = 4;
-    async fn request_one_vote(
+    async fn request_vote(
         rpc_client: RpcClient,
         args: RequestVoteArgs,
     ) -> Option<bool> {