Commit 800031c4 authored by Marc-André Lureau's avatar Marc-André Lureau
Browse files

zb: express Connection::receive_message with receive_specific



Simplify a bit the code.
Signed-off-by: default avatarMarc-André Lureau <marcandre.lureau@redhat.com>
parent ff408adb
......@@ -151,7 +151,7 @@ impl Connection {
/// end up in a deadlock situation. It is therefore highly recommended not to use such a
/// combination.
pub fn receive_message(&self) -> Result<Message> {
block_on(self.0.receive_specific(|_| ready(Ok(true)).boxed()))
self.receive_specific(|_| Ok(true))
}
/// Receive a specific message.
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment