From bd68d83519fc891930330d40bf934d28b3cae620 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Sat, 10 Jul 2021 12:33:54 +0200 Subject: [PATCH] Avoid unnecessary Result in returned message handler future --- zed-rpc/src/peer.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/zed-rpc/src/peer.rs b/zed-rpc/src/peer.rs index daf83e2f1b..5580fc628a 100644 --- a/zed-rpc/src/peer.rs +++ b/zed-rpc/src/peer.rs @@ -101,7 +101,7 @@ impl Peer { ) -> ( ConnectionId, impl Future> + Send, - impl Future>, + impl Future, ) where H: Fn(&mut Option, ConnectionId) -> Option, @@ -171,7 +171,6 @@ impl Peer { } } response_channels.lock().await.clear(); - Ok(()) }; self.connections @@ -657,7 +656,7 @@ mod tests { let (mut messages_ended_tx, mut messages_ended_rx) = postage::barrier::channel(); smol::spawn(async move { - message_handler.await.ok(); + message_handler.await; messages_ended_tx.send(()).await.unwrap(); }) .detach();