From 05bc875eeb6008b6c412c1601d21e532a1923008 Mon Sep 17 00:00:00 2001 From: "Ryan.K" Date: Thu, 6 Jul 2023 19:08:59 +0800 Subject: [PATCH] fixed typo --- core/src/message/handlers/connection.rs | 4 ++-- core/src/message/types.rs | 12 ++++++------ core/src/swarm/mod.rs | 2 -- 3 files changed, 8 insertions(+), 10 deletions(-) diff --git a/core/src/message/handlers/connection.rs b/core/src/message/handlers/connection.rs index e4d9c312f..880c65863 100644 --- a/core/src/message/handlers/connection.rs +++ b/core/src/message/handlers/connection.rs @@ -35,7 +35,7 @@ use crate::message::MessagePayload; pub async fn handle_join_dht(act: PeerRingAction) -> Result> { match act { PeerRingAction::None => Ok(vec![]), - // Ask next fo find successor for did, + // Ask next hop to find successor for did, // if there is only two nodes A, B, it may cause loop, for example // A's successor is B, B ask A to find successor for B // A may send message to it's successor, which is B @@ -76,7 +76,7 @@ pub async fn handle_join_dht(act: PeerRingAction) -> Result, } @@ -161,7 +161,7 @@ pub enum Message { FindSuccessorSend(FindSuccessorSend), /// Response of FindSuccessorSend FindSuccessorReport(FindSuccessorReport), - /// Remote message of notify a precessor + /// Remote message of notify a predecessor NotifyPredecessorSend(NotifyPredecessorSend), /// Response of NotifyPredecessorSend NotifyPredecessorReport(NotifyPredecessorReport), diff --git a/core/src/swarm/mod.rs b/core/src/swarm/mod.rs index 3448d0c14..53ab0776f 100644 --- a/core/src/swarm/mod.rs +++ b/core/src/swarm/mod.rs @@ -184,8 +184,6 @@ impl Swarm { } /// Event handler of Swarm. - #[cfg_attr(feature = "wasm", async_recursion(?Send))] - #[cfg_attr(not(feature = "wasm"), async_recursion)] pub async fn handle_message_handler_event( &self, event: &MessageHandlerEvent,