diff options
author | Alex Auvolat <alex@adnab.me> | 2022-07-21 19:25:07 +0200 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-07-21 19:25:07 +0200 |
commit | 7d148c7e764d563efa3bccc0f14f50867db38ef1 (patch) | |
tree | bd2f968b1f2d82b8c95ab7367fa7a282f97f0850 /src/peering/basalt.rs | |
parent | 44bbc1c00c2532e08dff0d4a547b0a707e89f32d (diff) | |
download | netapp-7d148c7e764d563efa3bccc0f14f50867db38ef1.tar.gz netapp-7d148c7e764d563efa3bccc0f14f50867db38ef1.zip |
One possibility, but I don't like it
Diffstat (limited to 'src/peering/basalt.rs')
-rw-r--r-- | src/peering/basalt.rs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/peering/basalt.rs b/src/peering/basalt.rs index 98977a3..d7bc6a8 100644 --- a/src/peering/basalt.rs +++ b/src/peering/basalt.rs @@ -16,7 +16,6 @@ use tokio::sync::watch; use crate::endpoint::*; use crate::message::*; use crate::netapp::*; -use crate::send::*; use crate::NodeID; // -- Protocol messages -- @@ -332,7 +331,7 @@ impl Basalt { async fn do_pull(self: Arc<Self>, peer: NodeID) { match self .pull_endpoint - .call(&peer, &PullMessage {}, PRIO_NORMAL) + .call(&peer, PullMessage {}, PRIO_NORMAL) .await { Ok(resp) => { @@ -347,7 +346,7 @@ impl Basalt { async fn do_push(self: Arc<Self>, peer: NodeID) { let push_msg = self.make_push_message(); - match self.push_endpoint.call(&peer, &push_msg, PRIO_NORMAL).await { + match self.push_endpoint.call(&peer, push_msg, PRIO_NORMAL).await { Ok(_) => { trace!("KYEV PEXo {}", hex::encode(peer)); } @@ -469,14 +468,14 @@ impl Basalt { #[async_trait] impl EndpointHandler<PullMessage> for Basalt { - async fn handle(self: &Arc<Self>, _pullmsg: &PullMessage, _from: NodeID) -> PushMessage { + async fn handle(self: &Arc<Self>, _pullmsg: PullMessage, _from: NodeID) -> PushMessage { self.make_push_message() } } #[async_trait] impl EndpointHandler<PushMessage> for Basalt { - async fn handle(self: &Arc<Self>, pushmsg: &PushMessage, _from: NodeID) { + async fn handle(self: &Arc<Self>, pushmsg: PushMessage, _from: NodeID) { self.handle_peer_list(&pushmsg.peers[..]); } } |