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 29, 2023
1 parent 869cca8 commit 301db84
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 301db84

Please sign in to comment.