From b9ce186d21e0f9d57a211fd8e1b0c36482293690 Mon Sep 17 00:00:00 2001 From: Antonio Scandurra Date: Mon, 30 Oct 2023 16:54:55 +0100 Subject: [PATCH] WIP --- crates/gpui2/src/view.rs | 7 +++++++ crates/workspace2/src/item.rs | 6 +++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/crates/gpui2/src/view.rs b/crates/gpui2/src/view.rs index e3e89b2add..897026267f 100644 --- a/crates/gpui2/src/view.rs +++ b/crates/gpui2/src/view.rs @@ -57,6 +57,13 @@ impl View { { cx.update_view(self, f) } + + pub fn read(&self, cx: &mut C) -> &V + where + C: VisualContext, + { + todo!() + } } impl Clone for View { diff --git a/crates/workspace2/src/item.rs b/crates/workspace2/src/item.rs index d359427053..aedbcd8393 100644 --- a/crates/workspace2/src/item.rs +++ b/crates/workspace2/src/item.rs @@ -159,9 +159,9 @@ pub trait Item: EventEmitter + Sized { // ) -> Task> { // unimplemented!("reload() must be implemented if can_save() returns true") // } - // fn to_item_events(_event: &Self::Event) -> SmallVec<[ItemEvent; 2]> { - // SmallVec::new() - // } + fn to_item_events(_event: &Self::Event) -> SmallVec<[ItemEvent; 2]> { + SmallVec::new() + } // fn should_close_item_on_event(_: &Self::Event) -> bool { // false // }