aboutsummaryrefslogtreecommitdiff
path: root/src/peering/basalt.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-07-22 10:55:37 +0200
committerAlex Auvolat <alex@adnab.me>2022-07-22 10:55:37 +0200
commitc358fe3c92da8a8454e461484737efe2a14dfd73 (patch)
treedb540e2e25a96585686826ef66f3552decee96df /src/peering/basalt.rs
parent4934ed726d51913afd97ca937d0ece39ef8b7371 (diff)
downloadnetapp-c358fe3c92da8a8454e461484737efe2a14dfd73.tar.gz
netapp-c358fe3c92da8a8454e461484737efe2a14dfd73.zip
Hide streaming versions as much as possible
Diffstat (limited to 'src/peering/basalt.rs')
-rw-r--r--src/peering/basalt.rs17
1 files changed, 4 insertions, 13 deletions
diff --git a/src/peering/basalt.rs b/src/peering/basalt.rs
index 71dea84..310077f 100644
--- a/src/peering/basalt.rs
+++ b/src/peering/basalt.rs
@@ -468,24 +468,15 @@ impl Basalt {
#[async_trait]
impl EndpointHandler<PullMessage> for Basalt {
- async fn handle(
- self: &Arc<Self>,
- _pullmsg: Req<PullMessage>,
- _from: NodeID,
- ) -> Resp<PullMessage> {
- Resp::new(self.make_push_message())
+ 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: Req<PushMessage>,
- _from: NodeID,
- ) -> Resp<PushMessage> {
- self.handle_peer_list(&pushmsg.msg().peers[..]);
- Resp::new(())
+ async fn handle(self: &Arc<Self>, pushmsg: &PushMessage, _from: NodeID) {
+ self.handle_peer_list(&pushmsg.peers[..]);
}
}