mirror of
https://github.com/rust-lang/rustlings.git
synced 2024-12-25 15:10:26 +00: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
|
||||
.exercises()
|
||||
.iter()
|
||||
.filter_map(|exercise| {
|
||||
match self.filter() {
|
||||
Filter::None => {
|
||||
Some(exercise)
|
||||
},
|
||||
Filter::Done => {
|
||||
if exercise.done {
|
||||
Some(exercise)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
},
|
||||
Filter::Pending => {
|
||||
if !exercise.done {
|
||||
Some(exercise)
|
||||
} else {
|
||||
None
|
||||
}
|
||||
}
|
||||
}
|
||||
.filter(|exercise| match self.filter() {
|
||||
Filter::None => true,
|
||||
Filter::Done => exercise.done,
|
||||
Filter::Pending => !exercise.done,
|
||||
})
|
||||
.enumerate()
|
||||
.find_map(|(i, s)| {
|
||||
|
|
Loading…
Reference in a new issue