Fix clippy::manual_let_else

This commit is contained in:
Héctor Ramón Jiménez 2023-09-20 05:30:08 +02:00
parent 1019d1e518
commit f8f1a86344
No known key found for this signature in database
GPG key ID: 7CC46565708259A7
7 changed files with 15 additions and 24 deletions

View file

@ -406,12 +406,9 @@ mod grid {
*interaction = Interaction::None;
}
let cursor_position =
if let Some(position) = cursor.position_in(bounds) {
position
} else {
return (event::Status::Ignored, None);
};
let Some(cursor_position) = cursor.position_in(bounds) else {
return (event::Status::Ignored, None);
};
let cell = Cell::at(self.project(cursor_position, bounds.size()));
let is_populated = self.state.contains(&cell);