From a4b0394f27e68d45c4a9745d133fad1406871c59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Lureau?= Date: Tue, 19 Mar 2024 14:00:23 +0400 Subject: [PATCH] qemu-rdw: minor code simplification MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Marc-André Lureau --- qemu-rdw/src/clipboard.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/qemu-rdw/src/clipboard.rs b/qemu-rdw/src/clipboard.rs index ca2045f..46dea69 100644 --- a/qemu-rdw/src/clipboard.rs +++ b/qemu-rdw/src/clipboard.rs @@ -221,9 +221,8 @@ fn watch_clipboard( } fn clipboard_from_selection(selection: ClipboardSelection) -> Option<(gdk::Clipboard, usize)> { - let display = match gdk::Display::default() { - Some(display) => display, - None => return None, + let Some(display) = gdk::Display::default() else { + return None; }; match selection {