diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 7acc6b1f..7ee7f53f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,6 +29,6 @@ jobs: target/ key: ubuntu-test-cargo-${{ hashFiles('**/Cargo.lock') }} - name: Lint - run: cargo clippy + run: cargo clippy -- --deny warnings - name: Build test run: cargo build diff --git a/crates/story/src/table_story.rs b/crates/story/src/table_story.rs index 96a97180..e2d70761 100644 --- a/crates/story/src/table_story.rs +++ b/crates/story/src/table_story.rs @@ -2,9 +2,8 @@ use std::time::{self, Duration}; use fake::{Fake, Faker}; use gpui::{ - div, impl_actions, AnyElement, ClickEvent, InteractiveElement, IntoElement, ParentElement, - Pixels, Render, SharedString, Styled, Timer, View, ViewContext, VisualContext as _, - WindowContext, + div, impl_actions, AnyElement, InteractiveElement, IntoElement, ParentElement, Pixels, Render, + SharedString, Styled, Timer, View, ViewContext, VisualContext as _, WindowContext, }; use serde::Deserialize; use ui::{ @@ -17,7 +16,7 @@ use ui::{ popup_menu::PopupMenuExt, prelude::FluentBuilder as _, table::{ColFixed, ColSort, Table, TableDelegate, TableEvent}, - v_flex, Selectable, Sizable, Size, + v_flex, Selectable, Size, }; #[derive(Clone, PartialEq, Eq, Deserialize)] @@ -662,7 +661,7 @@ impl Render for TableStory { .compact() .outline() .label(format!("size: {:?}", self.size)) - .popup_menu(move |menu, cx| { + .popup_menu(move |menu, _| { menu.menu_with_check( "Large", size == Size::Large, diff --git a/crates/ui/src/dock/mod.rs b/crates/ui/src/dock/mod.rs index 933fc9b3..a9d69a46 100644 --- a/crates/ui/src/dock/mod.rs +++ b/crates/ui/src/dock/mod.rs @@ -265,17 +265,17 @@ impl DockArea { DockPlacement::Left => self .left_dock .as_ref() - .and_then(|dock| Some(dock.read(cx).is_open())) + .map(|dock| dock.read(cx).is_open()) .unwrap_or(false), DockPlacement::Bottom => self .bottom_dock .as_ref() - .and_then(|dock| Some(dock.read(cx).is_open())) + .map(|dock| dock.read(cx).is_open()) .unwrap_or(false), DockPlacement::Right => self .right_dock .as_ref() - .and_then(|dock| Some(dock.read(cx).is_open())) + .map(|dock| dock.read(cx).is_open()) .unwrap_or(false), } } diff --git a/crates/ui/src/table.rs b/crates/ui/src/table.rs index 77682680..20fe1650 100644 --- a/crates/ui/src/table.rs +++ b/crates/ui/src/table.rs @@ -334,7 +334,7 @@ where fn set_selected_col(&mut self, col_ix: usize, cx: &mut ViewContext) { self.selection_state = SelectionState::Column; self.selected_col = Some(col_ix); - if let Some(col_ix) = self.selected_col { + if let Some(_col_ix) = self.selected_col { // TODO: Fix scroll to selected col, this was not working after fixed col. // if self.col_groups[col_ix].fixed.is_none() { // self.horizontal_scroll_handle.scroll_to_item(col_ix);