qemu-rdw: fix a clippy warning

Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
This commit is contained in:
Marc-André Lureau 2024-04-09 20:00:09 +04:00
parent 504611a853
commit 79fa942b7a

View File

@ -221,9 +221,7 @@ fn watch_clipboard(
}
fn clipboard_from_selection(selection: ClipboardSelection) -> Option<(gdk::Clipboard, usize)> {
let Some(display) = gdk::Display::default() else {
return None;
};
let display = gdk::Display::default()?;
match selection {
ClipboardSelection::Clipboard => Some((display.clipboard(), 0)),