From 078ebd7783fedc34e9ec437f358560b69bd0bee6 Mon Sep 17 00:00:00 2001 From: Hendrik Wolff Date: Sun, 29 Oct 2023 16:42:23 +0100 Subject: [PATCH] client: Replace if-else with `then_some` --- wayland-client/src/globals.rs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/wayland-client/src/globals.rs b/wayland-client/src/globals.rs index dbae4bbfa57..4054d62111e 100644 --- a/wayland-client/src/globals.rs +++ b/wayland-client/src/globals.rs @@ -156,12 +156,7 @@ impl GlobalList { .iter() // Find the with the correct interface .find_map(|Global { name, interface: interface_name, version }| { - // TODO: then_some - if interface.name == &interface_name[..] { - Some((*name, *version)) - } else { - None - } + (interface.name == &interface_name[..]).then_some((*name, *version)) }) .ok_or(BindError::NotPresent)?;