mirror of
https://github.com/ChrisTitusTech/linutil.git
synced 2024-12-04 18:56:05 +00:00
Compare commits
1 Commits
caf795fc8d
...
af2caa8d1a
Author | SHA1 | Date | |
---|---|---|---|
|
af2caa8d1a |
|
@ -93,9 +93,12 @@ impl Filter {
|
||||||
} else {
|
} else {
|
||||||
let input = self.search_input.iter().collect::<String>().to_lowercase();
|
let input = self.search_input.iter().collect::<String>().to_lowercase();
|
||||||
self.items.iter().find_map(|item| {
|
self.items.iter().find_map(|item| {
|
||||||
let item_name_lower = item.node.name.to_lowercase();
|
let item_name_lower = &item.node.name.to_lowercase();
|
||||||
(item_name_lower.starts_with(&input))
|
if item_name_lower.starts_with(&input) {
|
||||||
.then_some(item_name_lower[input.len()..].to_string())
|
Some(item_name_lower[input.len()..].to_string())
|
||||||
|
} else {
|
||||||
|
None
|
||||||
|
}
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user