qemu-display-listener: simplify ignored signals handling

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2021-07-21 18:39:24 +04:00
parent 36c84d517f
commit d98fa6dd7a

View File

@ -80,26 +80,22 @@ impl Console {
pub async fn dispatch_signals(&self) -> Result<()> {
use futures_util::{future::FutureExt, select};
select!(
if let Some(msg) = select!(
msg = self.proxy.next_signal().fuse() => {
if let Some(msg) = msg? {
log::debug!("Ignoring {:?}", msg);
}
Ok(())
msg?
},
msg = self.keyboard.next_signal().fuse() => {
if let Some(msg) = msg? {
log::debug!("Ignoring {:?}", msg);
}
Ok(())
msg?
},
msg = self.mouse.next_signal().fuse() => {
if let Some(msg) = msg? {
msg?
}
) {
if msg.primary_header().msg_type() == zbus::MessageType::Signal {
log::debug!("Ignoring {:?}", msg);
}
Ok(())
}
)
Ok(())
}
pub async fn label(&self) -> Result<String> {