fix clippy warning: branches-sharing-code

This commit is contained in:
figsoda 2021-06-17 21:38:58 -04:00
parent b52d3493ba
commit 1de20d58ec

View file

@ -441,11 +441,11 @@ async fn run() -> Result<()> {
0b001
}
Command::InputSearch(c) => {
if s.query.is_empty() {
s.query.push(c);
let empty = s.query.is_empty();
s.query.push(c);
if empty {
s.update_search(&queue_strings);
} else {
s.query.push(c);
let query = s.query.to_lowercase();
s.filtered.retain(|&i| queue_strings[i].contains(&query));
}