mirror of
https://github.com/notohh/rustlings.git
synced 2024-12-17 22:58:08 -05:00
fixed clippy lints
This commit is contained in:
parent
abf1228a0a
commit
71494264ca
1 changed files with 4 additions and 20 deletions
|
@ -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)| {
|
||||||
|
|
Loading…
Reference in a new issue