From 328e4d62785b9af7ecd4015f2905c8e9497dbc60 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C3=A9ter=20Le=C3=A9h?= <52788117+Ptrskay3@users.noreply.github.com> Date: Sat, 22 Feb 2025 10:13:35 +0100 Subject: [PATCH] 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 --- crates/project/src/search.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/project/src/search.rs b/crates/project/src/search.rs index c38fb6c94e8983a611a0545dc49b6855f4fefe9e..75bca1f8a03e1f48fa8a823e3b49e57c813b8ea5 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, + search: AhoCorasick, replacement: Option, 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,