Skip to content

armgit / zed

Public Imported from GitHub
0

Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.

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

Péter Leéh328e4d62785b
diff --git a/crates/project/src/search.rs b/crates/project/src/search.rs
index c38fb6c94e8..75bca1f8a03 100644
--- a/crates/project/src/search.rs
+++ b/crates/project/src/search.rs
@@ -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,