Skip to content

Commit 328e4d6

Browse files
authored
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
1 parent 83513ba commit 328e4d6

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

crates/project/src/search.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ impl SearchInputs {
5555
#[derive(Clone, Debug)]
5656
pub enum SearchQuery {
5757
Text {
58-
search: Arc<AhoCorasick>,
58+
search: AhoCorasick,
5959
replacement: Option<String>,
6060
whole_word: bool,
6161
case_sensitive: bool,
@@ -101,7 +101,7 @@ impl SearchQuery {
101101
buffers,
102102
};
103103
Ok(Self::Text {
104-
search: Arc::new(search),
104+
search,
105105
replacement: None,
106106
whole_word,
107107
case_sensitive,

0 commit comments

Comments
 (0)