Simplify is_picked expression in pane_grid

This commit is contained in:
Héctor Ramón Jiménez 2021-07-28 15:36:30 +07:00
parent be65a847b0
commit 6618c6bdd9
No known key found for this signature in database
GPG key ID: 140CC052C94F138E

View file

@ -458,11 +458,7 @@ where
.iter_mut() .iter_mut()
.zip(layout.children()) .zip(layout.children())
.map(|((pane, content), layout)| { .map(|((pane, content), layout)| {
let is_picked = if let Some(picked_pane) = picked_pane { let is_picked = picked_pane == Some(*pane);
picked_pane == *pane
} else {
false
};
content.on_event( content.on_event(
event.clone(), event.clone(),