From eec8660759574644d884adc3ca012895fcd7ebbd Mon Sep 17 00:00:00 2001 From: Waffle Maybe Date: Mon, 25 Mar 2024 16:11:35 +0100 Subject: [PATCH] Use `.is_some_and()` instead of `.is_some() && .unwrap()` (#9704) That's nicer & more readable. (I just noticed that this looks weird while trying to understand why zed changes my cursor, so decided to make a quick fix (btw the issue with the cursor is that zed always loads cursor named "default" on wayland)) Release Notes: - N/A --------- Co-authored-by: Marshall Bowers --- crates/gpui/src/platform/linux/platform.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/gpui/src/platform/linux/platform.rs b/crates/gpui/src/platform/linux/platform.rs index fd266c57ecef166d918fa54c29fd6218e8286b46..3394c624f74318c7b68ff7d38e87a9d476e74e78 100644 --- a/crates/gpui/src/platform/linux/platform.rs +++ b/crates/gpui/src/platform/linux/platform.rs @@ -74,7 +74,7 @@ impl Default for LinuxPlatform { impl LinuxPlatform { pub(crate) fn new() -> Self { let wayland_display = env::var_os("WAYLAND_DISPLAY"); - let use_wayland = wayland_display.is_some() && !wayland_display.unwrap().is_empty(); + let use_wayland = wayland_display.is_some_and(|display| !display.is_empty()); let (main_sender, main_receiver) = calloop::channel::channel::(); let text_system = Arc::new(LinuxTextSystem::new());