From 9f1e7a1e21db62c06219dd5b0f0f120d4c194266 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Mon, 11 Dec 2023 15:54:36 +0100 Subject: [PATCH] fixup! Further warnings churn --- crates/search2/src/project_search.rs | 57 ---------------------------- 1 file changed, 57 deletions(-) diff --git a/crates/search2/src/project_search.rs b/crates/search2/src/project_search.rs index 88d81a7e13d2f5a502813e2f5d2b8b629755c390..d006e26a9a148c400efe8f442fd79bd834155ba8 100644 --- a/crates/search2/src/project_search.rs +++ b/crates/search2/src/project_search.rs @@ -1425,63 +1425,6 @@ impl ProjectSearchBar { }); } } - fn toggle_replace_on_a_pane(pane: &mut Pane, _: &ToggleReplace, cx: &mut ViewContext) { - if let Some(search_view) = pane - .active_item() - .and_then(|item| item.downcast::()) - { - search_view.update(cx, |this, cx| { - cx.stop_propagation(); - this.replace_enabled = !this.replace_enabled; - if !this.replace_enabled { - let editor_handle = this.query_editor.focus_handle(cx); - cx.focus(&editor_handle); - } - cx.notify(); - }); - } - } - fn activate_text_mode(pane: &mut Pane, _: &ActivateTextMode, cx: &mut ViewContext) { - if let Some(search_view) = pane - .active_item() - .and_then(|item| item.downcast::()) - { - search_view.update(cx, |view, cx| { - view.activate_search_mode(SearchMode::Text, cx) - }); - cx.stop_propagation(); - } - } - - fn activate_regex_mode(pane: &mut Pane, _: &ActivateRegexMode, cx: &mut ViewContext) { - if let Some(search_view) = pane - .active_item() - .and_then(|item| item.downcast::()) - { - search_view.update(cx, |view, cx| { - view.activate_search_mode(SearchMode::Regex, cx) - }); - cx.stop_propagation(); - } - } - - fn activate_semantic_mode( - pane: &mut Pane, - _: &ActivateSemanticMode, - cx: &mut ViewContext, - ) { - if SemanticIndex::enabled(cx) { - if let Some(search_view) = pane - .active_item() - .and_then(|item| item.downcast::()) - { - search_view.update(cx, |view, cx| { - view.activate_search_mode(SearchMode::Semantic, cx) - }); - cx.stop_propagation(); - } - } - } fn toggle_filters(&mut self, cx: &mut ViewContext) -> bool { if let Some(search_view) = self.active_project_search.as_ref() {