Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Checkpoint - No warnings
Nathan Sobo769a04517f13
diff --git a/crates/gpui3/src/view.rs b/crates/gpui3/src/view.rsindex e8aaf2357a3..b4a4001692d 100644--- a/crates/gpui3/src/view.rs+++ b/crates/gpui3/src/view.rs@@ -62,7 +62,7 @@ impl<S: Send + Sync + 'static, P: Send + 'static> Element for View<S, P> {fn paint(&mut self,- layout: Layout,+ _: Layout,_: &mut Self::State,element: &mut Self::FrameState,cx: &mut ViewContext<Self::State>,@@ -92,12 +92,7 @@ impl<S: Send + Sync + 'static, P: Send + 'static> ViewObject for View<S, P> {})}- fn paint(- &mut self,- layout: Layout,- element: &mut dyn Any,- cx: &mut WindowContext,- ) -> Result<()> {+ fn paint(&mut self, _: Layout, element: &mut dyn Any, cx: &mut WindowContext) -> Result<()> {self.state.update(cx, |state, cx| {element.downcast_mut::<AnyElement<S>>()diff --git a/crates/gpui3/src/window.rs b/crates/gpui3/src/window.rsindex d264a2f1501..7c2416b146e 100644--- a/crates/gpui3/src/window.rs+++ b/crates/gpui3/src/window.rs@@ -89,12 +89,12 @@ impl<'a, 'w> WindowContext<'a, 'w> {}}- pub(crate) fn immutable(app: &'a AppContext, window: &'w Window) -> Self {- Self {- app: Reference::Immutable(app),- window: Reference::Immutable(window),- }- }+ // pub(crate) fn immutable(app: &'a AppContext, window: &'w Window) -> Self {+ // Self {+ // app: Reference::Immutable(app),+ // window: Reference::Immutable(window),+ // }+ // }pub(crate) fn draw(&mut self) -> Result<()> {let unit_entity = self.unit_entity.clone();@@ -204,18 +204,6 @@ impl<'a, 'w> WindowContext<'a, 'w> {pub fn mouse_position(&self) -> Point<Pixels> {self.window.mouse_position}-- fn update_window<R>(- &mut self,- window_handle: AnyWindowHandle,- update: impl FnOnce(&mut WindowContext) -> R,- ) -> Result<R> {- if window_handle == self.window.handle {- Ok(update(self))- } else {- self.app.update_window(window_handle.id, update)- }- }}impl Context for WindowContext<'_, '_> {@@ -280,19 +268,6 @@ pub struct ViewContext<'a, 'w, T> {}impl<'a, 'w, T: Send + Sync + 'static> ViewContext<'a, 'w, T> {- // fn update<R>(&mut self, update: impl FnOnce(&mut T, &mut Self) -> R) -> R {-- // self.window_cx.update_entity(handle, update)-- // let mut entity = self.window_cx.app.entities.remove(&self.entity_id).unwrap();- // let result = update(entity.downcast_mut::<T>().unwrap(), self);- // self.window_cx- // .app- // .entities- // .insert(self.entity_id, Box::new(entity));- // result- // }-fn mutable(app: &'a mut AppContext, window: &'w mut Window, entity_id: EntityId) -> Self {Self {window_cx: WindowContext::mutable(app, window),@@ -301,13 +276,13 @@ impl<'a, 'w, T: Send + Sync + 'static> ViewContext<'a, 'w, T> {}}- fn immutable(app: &'a AppContext, window: &'w Window, entity_id: EntityId) -> Self {- Self {- window_cx: WindowContext::immutable(app, window),- entity_id,- entity_type: PhantomData,- }- }+ // fn immutable(app: &'a AppContext, window: &'w Window, entity_id: EntityId) -> Self {+ // Self {+ // window_cx: WindowContext::immutable(app, window),+ // entity_id,+ // entity_type: PhantomData,+ // }+ // }pub fn erase_state<R>(&mut self, f: impl FnOnce(&mut ViewContext<()>) -> R) -> R {let entity_id = self.unit_entity.id;diff --git a/crates/storybook2/src/workspace.rs b/crates/storybook2/src/workspace.rsindex cd1be7a5e4c..c614af490d3 100644--- a/crates/storybook2/src/workspace.rs+++ b/crates/storybook2/src/workspace.rs@@ -291,7 +291,6 @@ impl Titlebar {// ================================================================================ //mod statusbar {- use gpui3::WindowContext;use super::*;