Skip to content

Commit

Permalink
client: Replace if-else with then_some
Browse files Browse the repository at this point in the history
  • Loading branch information
hw0lff committed Oct 31, 2023
1 parent aee3654 commit 078ebd7
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions wayland-client/src/globals.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;

Expand Down

0 comments on commit 078ebd7

Please sign in to comment.