mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-26 03:59:55 +00:00
Avoid unnecessary Result in returned message handler future
This commit is contained in:
parent
4f752a4144
commit
bd68d83519
1 changed files with 2 additions and 3 deletions
|
@ -101,7 +101,7 @@ impl Peer {
|
||||||
) -> (
|
) -> (
|
||||||
ConnectionId,
|
ConnectionId,
|
||||||
impl Future<Output = anyhow::Result<()>> + Send,
|
impl Future<Output = anyhow::Result<()>> + Send,
|
||||||
impl Future<Output = anyhow::Result<()>>,
|
impl Future<Output = ()>,
|
||||||
)
|
)
|
||||||
where
|
where
|
||||||
H: Fn(&mut Option<proto::Envelope>, ConnectionId) -> Option<Fut>,
|
H: Fn(&mut Option<proto::Envelope>, ConnectionId) -> Option<Fut>,
|
||||||
|
@ -171,7 +171,6 @@ impl Peer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
response_channels.lock().await.clear();
|
response_channels.lock().await.clear();
|
||||||
Ok(())
|
|
||||||
};
|
};
|
||||||
|
|
||||||
self.connections
|
self.connections
|
||||||
|
@ -657,7 +656,7 @@ mod tests {
|
||||||
|
|
||||||
let (mut messages_ended_tx, mut messages_ended_rx) = postage::barrier::channel();
|
let (mut messages_ended_tx, mut messages_ended_rx) = postage::barrier::channel();
|
||||||
smol::spawn(async move {
|
smol::spawn(async move {
|
||||||
message_handler.await.ok();
|
message_handler.await;
|
||||||
messages_ended_tx.send(()).await.unwrap();
|
messages_ended_tx.send(()).await.unwrap();
|
||||||
})
|
})
|
||||||
.detach();
|
.detach();
|
||||||
|
|
Loading…
Reference in a new issue