diff --git a/crates/search2/src/mode.rs b/crates/search2/src/mode.rs index 4b036d29a5..817fb454d2 100644 --- a/crates/search2/src/mode.rs +++ b/crates/search2/src/mode.rs @@ -1,6 +1,3 @@ -use gpui::Action; - -use crate::{ActivateRegexMode, ActivateSemanticMode, ActivateTextMode}; // TODO: Update the default search mode to get from config #[derive(Copy, Clone, Debug, Default, PartialEq)] pub enum SearchMode { @@ -11,11 +8,11 @@ pub enum SearchMode { } impl SearchMode { - pub(crate) fn activate_action(&self) -> Box { + pub(crate) fn label(&self) -> &'static str { match self { - SearchMode::Text => Box::new(ActivateTextMode), - SearchMode::Semantic => Box::new(ActivateSemanticMode), - SearchMode::Regex => Box::new(ActivateRegexMode), + SearchMode::Text => "Text", + SearchMode::Semantic => "Semantic", + SearchMode::Regex => "Regex", } } } diff --git a/crates/search2/src/search_bar.rs b/crates/search2/src/search_bar.rs index cd3b5e474b..1c4f2a17a6 100644 --- a/crates/search2/src/search_bar.rs +++ b/crates/search2/src/search_bar.rs @@ -1,6 +1,6 @@ -use std::{borrow::Cow, sync::Arc}; +use std::sync::Arc; -use gpui::{div, Action, Component, ViewContext}; +use gpui::{Component, ViewContext}; use ui::{Button, ButtonVariant, IconButton}; use crate::mode::SearchMode;