From 8283909dfd22b1ec8e972c672793772783d2a6bd Mon Sep 17 00:00:00 2001 From: Conrad Irwin Date: Thu, 2 Nov 2023 13:28:58 -0600 Subject: [PATCH] Disable selective warnings to make cargo check happy --- crates/workspace2/src/pane_group.rs | 2 +- crates/workspace2/src/status_bar.rs | 4 ++-- crates/workspace2/src/toolbar.rs | 10 ++++++---- crates/workspace2/src/workspace2.rs | 5 ++++- crates/zed2/src/main.rs | 5 ++++- crates/zed2/src/zed2.rs | 4 +++- 6 files changed, 20 insertions(+), 10 deletions(-) diff --git a/crates/workspace2/src/pane_group.rs b/crates/workspace2/src/pane_group.rs index a0526fdcba..e521c51bda 100644 --- a/crates/workspace2/src/pane_group.rs +++ b/crates/workspace2/src/pane_group.rs @@ -7,7 +7,7 @@ use db2::sqlez::{ statement::Statement, }; use gpui2::{ - point, size, AnyElement, AnyView, AnyWeakView, Bounds, Model, Pixels, Point, View, ViewContext, + point, size, AnyElement, AnyWeakView, Bounds, Model, Pixels, Point, View, ViewContext, }; use parking_lot::Mutex; use project2::Project; diff --git a/crates/workspace2/src/status_bar.rs b/crates/workspace2/src/status_bar.rs index 52134683d8..c2f78d9ad6 100644 --- a/crates/workspace2/src/status_bar.rs +++ b/crates/workspace2/src/status_bar.rs @@ -2,8 +2,8 @@ use std::any::TypeId; use crate::{ItemHandle, Pane}; use gpui2::{ - div, AnyView, Component, Div, Element, ParentElement, Render, Styled, Subscription, View, - ViewContext, WindowContext, + div, AnyView, Component, Div, ParentElement, Render, Styled, Subscription, View, ViewContext, + WindowContext, }; use theme2::ActiveTheme; use util::ResultExt; diff --git a/crates/workspace2/src/toolbar.rs b/crates/workspace2/src/toolbar.rs index 55429af791..c3d1e520c7 100644 --- a/crates/workspace2/src/toolbar.rs +++ b/crates/workspace2/src/toolbar.rs @@ -1,5 +1,7 @@ use crate::ItemHandle; -use gpui2::{AnyView, AppContext, EventEmitter, Render, View, ViewContext, WindowContext}; +use gpui2::{ + AnyView, AppContext, Entity, EntityId, EventEmitter, Render, View, ViewContext, WindowContext, +}; pub trait ToolbarItemView: Render + EventEmitter { fn set_active_pane_item( @@ -28,7 +30,7 @@ pub trait ToolbarItemView: Render + EventEmitter { } trait ToolbarItemViewHandle: Send { - fn id(&self) -> usize; + fn id(&self) -> EntityId; fn to_any(&self) -> AnyView; fn set_active_pane_item( &self, @@ -258,8 +260,8 @@ impl Toolbar { } impl ToolbarItemViewHandle for View { - fn id(&self) -> usize { - self.id() + fn id(&self) -> EntityId { + self.entity_id() } fn to_any(&self) -> AnyView { diff --git a/crates/workspace2/src/workspace2.rs b/crates/workspace2/src/workspace2.rs index 2486463392..6d29751073 100644 --- a/crates/workspace2/src/workspace2.rs +++ b/crates/workspace2/src/workspace2.rs @@ -1,3 +1,6 @@ +#![allow(unused_variables, dead_code, unused_mut)] +// todo!() this is to make transition easier. + pub mod dock; pub mod item; pub mod notifications; @@ -2999,7 +3002,7 @@ impl Workspace { } Some(()) - }); + })?; } Ok(()) } diff --git a/crates/zed2/src/main.rs b/crates/zed2/src/main.rs index 05ca4690b8..f8b77fe9df 100644 --- a/crates/zed2/src/main.rs +++ b/crates/zed2/src/main.rs @@ -1,3 +1,6 @@ +#![allow(unused_variables, dead_code, unused_mut)] +// todo!() this is to make transition easier. + // Allow binary to be called Zed for a nice application menu when running executable directly #![allow(non_snake_case)] @@ -24,7 +27,7 @@ use settings::{ default_settings, handle_settings_file_changes, watch_config_file, Settings, SettingsStore, }; use simplelog::ConfigBuilder; -use smol::{future::FutureExt, process::Command}; +use smol::process::Command; use std::{ env, ffi::OsStr, diff --git a/crates/zed2/src/zed2.rs b/crates/zed2/src/zed2.rs index fe57d12752..04778f29dd 100644 --- a/crates/zed2/src/zed2.rs +++ b/crates/zed2/src/zed2.rs @@ -1,3 +1,6 @@ +#![allow(unused_variables, dead_code, unused_mut)] +// todo!() this is to make transition easier. + mod assets; pub mod languages; mod only_instance; @@ -5,7 +8,6 @@ mod open_listener; pub use assets::*; use collections::HashMap; -use client::{Client, UserStore}; use gpui::{ point, px, AppContext, AsyncAppContext, AsyncWindowContext, Point, Task, TitlebarOptions, WeakView, WindowBounds, WindowKind, WindowOptions,