fixed clippy lints

This commit is contained in:
Adhyan 2024-09-02 11:02:17 -06:00
parent abf1228a0a
commit 71494264ca

View file

@ -352,26 +352,10 @@ impl<'a> ListState<'a> {
.app_state .app_state
.exercises() .exercises()
.iter() .iter()
.filter_map(|exercise| { .filter(|exercise| match self.filter() {
match self.filter() { Filter::None => true,
Filter::None => { Filter::Done => exercise.done,
Some(exercise) Filter::Pending => !exercise.done,
},
Filter::Done => {
if exercise.done {
Some(exercise)
} else {
None
}
},
Filter::Pending => {
if !exercise.done {
Some(exercise)
} else {
None
}
}
}
}) })
.enumerate() .enumerate()
.find_map(|(i, s)| { .find_map(|(i, s)| {