Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
fixup! Remove dead code (for now).
Piotr Osiewiczae1ebc68583f
diff --git a/crates/search2/src/mode.rs b/crates/search2/src/mode.rsindex 4b036d29a5a..817fb454d2d 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<dyn Action> {+ 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.rsindex cd3b5e474bb..1c4f2a17a6d 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;