Remove unnecessary Arc from AhoCorasick since it's using it internally (#25379)

This PR removes the unnecessary `Arc` around the `AhoCorasick` struct,
since [it's already using it
internally](https://docs.rs/aho-corasick/latest/aho_corasick/struct.AhoCorasick.html#cloning).

Release Notes:

- N/A
This commit is contained in:
Péter Leéh 2025-02-22 10:13:35 +01:00 committed by GitHub
parent 83513bab59
commit 328e4d6278
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -55,7 +55,7 @@ impl SearchInputs {
#[derive(Clone, Debug)]
pub enum SearchQuery {
Text {
search: Arc<AhoCorasick>,
search: AhoCorasick,
replacement: Option<String>,
whole_word: bool,
case_sensitive: bool,
@ -101,7 +101,7 @@ impl SearchQuery {
buffers,
};
Ok(Self::Text {
search: Arc::new(search),
search,
replacement: None,
whole_word,
case_sensitive,