mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-11-23 21:51:56 +00:00
Update tui/src/filter.rs
Co-authored-by: Liam <33645555+lj3954@users.noreply.github.com>
This commit is contained in:
parent
02b06129e1
commit
df81642c9e
|
@ -93,12 +93,9 @@ impl Filter {
|
|||
} else {
|
||||
let input = self.search_input.iter().collect::<String>().to_lowercase();
|
||||
self.items.iter().find_map(|item| {
|
||||
let item_name_lower = &item.node.name.to_lowercase();
|
||||
if item_name_lower.starts_with(&input) {
|
||||
Some(item_name_lower[input.len()..].to_string())
|
||||
} else {
|
||||
None
|
||||
}
|
||||
let item_name_lower = item.node.name.to_lowercase();
|
||||
(item_name_lower.starts_with(&input))
|
||||
.then_some(item_name_lower[input.len()..].to_string())
|
||||
})
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user