From e2b8e6ce63ad5a2ac70cd0661860c1e9664b4b88 Mon Sep 17 00:00:00 2001 From: Piotr Osiewicz <24362066+osiewicz@users.noreply.github.com> Date: Wed, 9 Aug 2023 01:16:24 +0200 Subject: [PATCH] chore: fix compiler warnings --- crates/search/src/buffer_search.rs | 40 --------------------- crates/semantic_index/src/semantic_index.rs | 2 +- 2 files changed, 1 insertion(+), 41 deletions(-) diff --git a/crates/search/src/buffer_search.rs b/crates/search/src/buffer_search.rs index b9b09523cc..d7add91599 100644 --- a/crates/search/src/buffer_search.rs +++ b/crates/search/src/buffer_search.rs @@ -468,46 +468,6 @@ impl BufferSearchBar { self.update_matches(cx) } - fn render_search_option( - &self, - option_supported: bool, - icon: &'static str, - option: SearchOptions, - cx: &mut ViewContext, - ) -> Option> { - if !option_supported { - return None; - } - - let tooltip_style = theme::current(cx).tooltip.clone(); - let is_active = self.search_options.contains(option); - Some( - MouseEventHandler::::new(option.bits as usize, cx, |state, cx| { - let theme = theme::current(cx); - let style = theme - .search - .option_button - .in_state(is_active) - .style_for(state); - Label::new(icon, style.text.clone()) - .contained() - .with_style(style.container) - }) - .on_click(MouseButton::Left, move |_, this, cx| { - this.toggle_search_option(option, cx); - }) - .with_cursor_style(CursorStyle::PointingHand) - .with_tooltip::( - option.bits as usize, - format!("Toggle {}", option.label()), - Some(option.to_toggle_action()), - tooltip_style, - cx, - ) - .into_any(), - ) - } - fn render_nav_button( &self, icon: &'static str, diff --git a/crates/semantic_index/src/semantic_index.rs b/crates/semantic_index/src/semantic_index.rs index 50b871d454..8c9877b9d3 100644 --- a/crates/semantic_index/src/semantic_index.rs +++ b/crates/semantic_index/src/semantic_index.rs @@ -16,7 +16,7 @@ use language::{Anchor, Buffer, Language, LanguageRegistry}; use parking_lot::Mutex; use parsing::{CodeContextRetriever, Document, PARSEABLE_ENTIRE_FILE_TYPES}; use postage::watch; -use project::{project_settings, search::PathMatcher, Fs, Project, WorktreeId}; +use project::{search::PathMatcher, Fs, Project, WorktreeId}; use smol::channel; use std::{ cmp::Ordering,