chore: Use aho-corasick 1.1 in direct dependencies (#2983)

Nothing too fancy, we've depended indirectly on 1.0/1.1 already, so this
is essentially bookkeeping.

Release Notes:
- N/A
This commit is contained in:
Piotr Osiewicz 2023-09-18 17:01:08 +02:00 committed by GitHub
parent 5c22e40e99
commit 616d328f3c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
11 changed files with 99 additions and 67 deletions

View file

@ -783,14 +783,21 @@ impl BufferSearchBar {
}
}
} else {
SearchQuery::text(
match SearchQuery::text(
query,
self.search_options.contains(SearchOptions::WHOLE_WORD),
self.search_options.contains(SearchOptions::CASE_SENSITIVE),
Vec::new(),
Vec::new(),
)
.with_replacement(Some(self.replacement(cx)).filter(|s| !s.is_empty()))
) {
Ok(query) => query
.with_replacement(Some(self.replacement(cx)).filter(|s| !s.is_empty())),
Err(_) => {
self.query_contains_error = true;
cx.notify();
return done_rx;
}
}
}
.into();
self.active_search = Some(query.clone());

View file

@ -1050,13 +1050,23 @@ impl ProjectSearchView {
}
}
}
_ => Some(SearchQuery::text(
_ => match SearchQuery::text(
text,
self.search_options.contains(SearchOptions::WHOLE_WORD),
self.search_options.contains(SearchOptions::CASE_SENSITIVE),
included_files,
excluded_files,
)),
) {
Ok(query) => {
self.panels_with_errors.remove(&InputPanel::Query);
Some(query)
}
Err(_e) => {
self.panels_with_errors.insert(InputPanel::Query);
cx.notify();
None
}
},
}
}