mirror of
https://github.com/kdheepak/taskwarrior-tui.git
synced 2025-08-25 08:47:18 +02:00
chore: change and_then to map based on clippy suggestion ♻️
This commit is contained in:
parent
73ff6cbe39
commit
6ec344897a
1 changed files with 1 additions and 4 deletions
|
@ -170,10 +170,7 @@ impl CompletionList {
|
|||
}
|
||||
|
||||
pub fn selected(&self) -> Option<(usize, Completion)> {
|
||||
self.state
|
||||
.selected()
|
||||
.and_then(|i| self.get(i))
|
||||
.and_then(|s| Some((self.pos, s)))
|
||||
self.state.selected().and_then(|i| self.get(i)).map(|s| (self.pos, s))
|
||||
}
|
||||
|
||||
pub fn is_empty(&self) -> bool {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue