Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove IntoAnyElement bound from Element trait
Nathan Sobo927278e20d14
diff --git a/crates/copilot2/src/sign_in.rs b/crates/copilot2/src/sign_in.rsindex ab326a88195..57f248aa524 100644--- a/crates/copilot2/src/sign_in.rs+++ b/crates/copilot2/src/sign_in.rs@@ -106,7 +106,7 @@// data: &PromptUserDeviceFlow,// style: &theme::Copilot,// cx: &mut ViewContext<Self>,-// ) -> impl Element<Self> {+// ) -> impl IntoAnyElement<Self> {// let copied = cx// .read_from_clipboard()// .map(|item| item.text() == &data.user_code)diff --git a/crates/storybook2/src/stories/kitchen_sink.rs b/crates/storybook2/src/stories/kitchen_sink.rsindex 63cb1d0f517..fbb4f5099c6 100644--- a/crates/storybook2/src/stories/kitchen_sink.rs+++ b/crates/storybook2/src/stories/kitchen_sink.rs@@ -16,7 +16,7 @@ impl KitchenSinkStory {view(cx.entity(|cx| Self::new()), Self::render)}- fn render(&mut self, cx: &mut ViewContext<Self>) -> impl Element<Self> {+ fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoAnyElement<Self> {let element_stories = ElementStory::iter().map(|selector| selector.story(cx)).collect::<Vec<_>>();diff --git a/crates/storybook2/src/stories/scroll.rs b/crates/storybook2/src/stories/scroll.rsindex 67200b52bcc..f589ea7cef9 100644--- a/crates/storybook2/src/stories/scroll.rs+++ b/crates/storybook2/src/stories/scroll.rs@@ -1,6 +1,7 @@use crate::themes::rose_pine;use gpui2::{- div, px, view, Context, Element, ParentElement, SharedString, Styled, View, WindowContext,+ div, px, view, Context, IntoAnyElement, ParentElement, SharedString, Styled, View,+ WindowContext,};use ui::ElementExt;@@ -16,7 +17,7 @@ impl ScrollStory {}}-fn checkerboard<S>(depth: usize) -> impl Element<S>+fn checkerboard<S>(depth: usize) -> impl IntoAnyElement<S>whereS: 'static + Send + Sync,{diff --git a/crates/storybook2/src/stories/z_index.rs b/crates/storybook2/src/stories/z_index.rsindex 39ac6fd6e41..213d7bed4ea 100644--- a/crates/storybook2/src/stories/z_index.rs+++ b/crates/storybook2/src/stories/z_index.rs@@ -19,7 +19,7 @@ impl<S: 'static + Send + Sync> ZIndexStory<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title(cx, "z-index")).child(@@ -102,7 +102,7 @@ impl<V: 'static + Send + Sync> ZIndexExample<V> {}}- fn render(&mut self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Element<V> {+ fn render(&mut self, _view: &mut V, cx: &mut ViewContext<V>) -> impl IntoAnyElement<V> {div().relative().size_full()diff --git a/crates/storybook2/src/storybook2.rs b/crates/storybook2/src/storybook2.rsindex 107d737ef92..4db1fd434ba 100644--- a/crates/storybook2/src/storybook2.rs+++ b/crates/storybook2/src/storybook2.rs@@ -10,7 +10,7 @@ use std::sync::Arc;use clap::Parser;use gpui2::{- div, px, size, view, AnyView, AppContext, Bounds, Context, Element, ViewContext, WindowBounds,+ div, px, size, view, AnyView, AppContext, Bounds, Context, ViewContext, WindowBounds,WindowOptions,};use log::LevelFilter;@@ -107,7 +107,7 @@ impl StoryWrapper {Self { story, theme }}- fn render(&mut self, cx: &mut ViewContext<Self>) -> impl Element<Self> {+ fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoAnyElement<Self> {themed(self.theme.clone(), cx, |cx| {div().flex()diff --git a/crates/ui2/src/components/assistant_panel.rs b/crates/ui2/src/components/assistant_panel.rsindex 77d29f44f78..1c47bf1a913 100644--- a/crates/ui2/src/components/assistant_panel.rs+++ b/crates/ui2/src/components/assistant_panel.rs@@ -26,7 +26,7 @@ impl<S: 'static + Send + Sync> AssistantPanel<S> {self}- fn render(&mut self, view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Panel::new(self.id.clone(), cx).children(vec![div().flex()@@ -96,11 +96,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, AssistantPanel<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/breadcrumb.rs b/crates/ui2/src/components/breadcrumb.rsindex 4bd5283db3c..5f4d3cbafe5 100644--- a/crates/ui2/src/components/breadcrumb.rs+++ b/crates/ui2/src/components/breadcrumb.rs@@ -31,11 +31,7 @@ impl<S: 'static + Send + Sync> Breadcrumb<S> {div().child(" › ").text_color(theme.text_muted)}- fn render(- &mut self,- view_state: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, view_state: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let symbols_len = self.symbols.len();@@ -106,7 +102,7 @@ mod stories {&mut self,view_state: &mut S,cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ ) -> impl IntoAnyElement<S> {let theme = theme(cx);Story::container(cx)diff --git a/crates/ui2/src/components/buffer.rs b/crates/ui2/src/components/buffer.rsindex 51f5ea91965..7b67afc2b40 100644--- a/crates/ui2/src/components/buffer.rs+++ b/crates/ui2/src/components/buffer.rs@@ -158,7 +158,7 @@ impl<S: 'static + Send + Sync + Clone> Buffer<S> {self}- fn render_row(row: BufferRow, cx: &WindowContext) -> impl Element<S> {+ fn render_row(row: BufferRow, cx: &WindowContext) -> impl IntoAnyElement<S> {let theme = theme(cx);let line_background = if row.current {@@ -208,7 +208,7 @@ impl<S: 'static + Send + Sync + Clone> Buffer<S> {}))}- fn render_rows(&self, cx: &WindowContext) -> Vec<impl Element<S>> {+ fn render_rows(&self, cx: &WindowContext) -> Vec<impl IntoAnyElement<S>> {match &self.rows {Some(rows) => rows.rows@@ -219,7 +219,7 @@ impl<S: 'static + Send + Sync + Clone> Buffer<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let rows = self.render_rows(cx);@@ -258,11 +258,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);Story::container(cx)diff --git a/crates/ui2/src/components/buffer_search.rs b/crates/ui2/src/components/buffer_search.rsindex 3294aec7806..e3e92aa073f 100644--- a/crates/ui2/src/components/buffer_search.rs+++ b/crates/ui2/src/components/buffer_search.rs@@ -25,7 +25,7 @@ impl BufferSearch {view(cx.entity(|cx| Self::new()), Self::render)}- fn render(&mut self, cx: &mut ViewContext<Self>) -> impl Element<Self> {+ fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoAnyElement<Self> {let theme = theme(cx);h_stack().bg(theme.toolbar).p_2().child(diff --git a/crates/ui2/src/components/chat_panel.rs b/crates/ui2/src/components/chat_panel.rsindex b66868138f8..afb79cc9076 100644--- a/crates/ui2/src/components/chat_panel.rs+++ b/crates/ui2/src/components/chat_panel.rs@@ -24,7 +24,7 @@ impl<S: 'static + Send + Sync> ChatPanel<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {div().id(self.element_id.clone()).flex()@@ -88,7 +88,7 @@ impl<S: 'static + Send + Sync> ChatMessage<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {div().flex().flex_col()@@ -129,11 +129,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, ChatPanel<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/collab_panel.rs b/crates/ui2/src/components/collab_panel.rsindex 40276f20b35..d7dfcdceab4 100644--- a/crates/ui2/src/components/collab_panel.rs+++ b/crates/ui2/src/components/collab_panel.rs@@ -19,7 +19,7 @@ impl<S: 'static + Send + Sync> CollabPanel<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);v_stack()@@ -110,11 +110,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, CollabPanel<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/command_palette.rs b/crates/ui2/src/components/command_palette.rsindex 036a41e0b90..b2418813d5f 100644--- a/crates/ui2/src/components/command_palette.rs+++ b/crates/ui2/src/components/command_palette.rs@@ -17,7 +17,7 @@ impl<S: 'static + Send + Sync> CommandPalette<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {div().id(self.id.clone()).child(Palette::new("palette").items(example_editor_actions())@@ -49,11 +49,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, CommandPalette<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/context_menu.rs b/crates/ui2/src/components/context_menu.rsindex fb076dc9fe4..ea12cdcfc58 100644--- a/crates/ui2/src/components/context_menu.rs+++ b/crates/ui2/src/components/context_menu.rs@@ -42,7 +42,7 @@ impl<S: 'static + Send + Sync> ContextMenu<S> {items: items.into_iter().collect(),}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);v_stack()@@ -85,11 +85,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, ContextMenu<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/copilot.rs b/crates/ui2/src/components/copilot.rsindex 8c51b1f4ebd..b1f41078e8b 100644--- a/crates/ui2/src/components/copilot.rs+++ b/crates/ui2/src/components/copilot.rs@@ -16,7 +16,7 @@ impl<S: 'static + Send + Sync + Clone> CopilotModal<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {div().id(self.id.clone()).child(Modal::new("some-id").title("Connect Copilot to Zed")@@ -47,11 +47,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, CopilotModal<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/editor_pane.rs b/crates/ui2/src/components/editor_pane.rsindex b641c86f7e2..3fc41d7db6c 100644--- a/crates/ui2/src/components/editor_pane.rs+++ b/crates/ui2/src/components/editor_pane.rs@@ -49,7 +49,7 @@ impl EditorPane {)}- fn render(&mut self, cx: &mut ViewContext<Self>) -> impl Element<Self> {+ fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoAnyElement<Self> {v_stack().w_full().h_full()diff --git a/crates/ui2/src/components/facepile.rs b/crates/ui2/src/components/facepile.rsindex b75ef328f33..0763b34b03f 100644--- a/crates/ui2/src/components/facepile.rs+++ b/crates/ui2/src/components/facepile.rs@@ -17,7 +17,7 @@ impl<S: 'static + Send + Sync> Facepile<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let player_count = self.players.len();let player_list = self.players.iter().enumerate().map(|(ix, player)| {let isnt_last = ix < player_count - 1;@@ -51,11 +51,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let players = static_players();Story::container(cx)diff --git a/crates/ui2/src/components/icon_button.rs b/crates/ui2/src/components/icon_button.rsindex 77d248e9ee1..63158421930 100644--- a/crates/ui2/src/components/icon_button.rs+++ b/crates/ui2/src/components/icon_button.rs@@ -68,7 +68,7 @@ impl<S: 'static + Send + Sync> IconButton<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let icon_color = match (self.state, self.color) {diff --git a/crates/ui2/src/components/keybinding.rs b/crates/ui2/src/components/keybinding.rsindex 25de760cabe..78d05e4f303 100644--- a/crates/ui2/src/components/keybinding.rs+++ b/crates/ui2/src/components/keybinding.rs@@ -34,7 +34,7 @@ impl<S: 'static + Send + Sync> Keybinding<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {div().flex().gap_2()@@ -68,7 +68,7 @@ impl<S: 'static + Send + Sync> Key<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);div()@@ -185,11 +185,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let all_modifier_permutations = ModifierKey::iter().permutations(2);Story::container(cx)diff --git a/crates/ui2/src/components/language_selector.rs b/crates/ui2/src/components/language_selector.rsindex dbead8467e0..0aea61b9a03 100644--- a/crates/ui2/src/components/language_selector.rs+++ b/crates/ui2/src/components/language_selector.rs@@ -17,7 +17,7 @@ impl<S: 'static + Send + Sync + Clone> LanguageSelector<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {div().id(self.id.clone()).child(Palette::new("palette").items(vec![@@ -60,11 +60,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, LanguageSelector<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/list.rs b/crates/ui2/src/components/list.rsindex 0c41671247c..b7557b44d44 100644--- a/crates/ui2/src/components/list.rs+++ b/crates/ui2/src/components/list.rs@@ -92,7 +92,7 @@ impl<S: 'static + Send + Sync> ListHeader<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let is_toggleable = self.toggleable != Toggleable::NotToggleable;@@ -157,7 +157,7 @@ impl<S: 'static + Send + Sync> ListSubHeader<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {h_stack().flex_1().w_full().relative().py_1().child(div().h_6()@@ -230,7 +230,7 @@ impl<S: 'static + Send + Sync> From<ListSubHeader<S>> for ListItem<S> {}impl<S: 'static + Send + Sync> ListItem<S> {- fn render(&mut self, view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {match self {ListItem::Entry(entry) => div().child(entry.render(view, cx)),ListItem::Separator(separator) => div().child(separator.render(view, cx)),@@ -344,10 +344,7 @@ impl<S: 'static + Send + Sync> ListEntry<S> {}}- fn disclosure_control(- &mut self,- cx: &mut ViewContext<S>,- ) -> Option<impl Element<S>> {+ fn disclosure_control(&mut self, cx: &mut ViewContext<S>) -> Option<impl IntoAnyElement<S>> {let disclosure_control_icon = if let Some(ToggleState::Toggled) = self.toggle {IconElement::new(Icon::ChevronDown)} else {@@ -367,7 +364,7 @@ impl<S: 'static + Send + Sync> ListEntry<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let settings = user_settings(cx);let theme = theme(cx);@@ -477,7 +474,7 @@ impl<S: 'static + Send + Sync> ListDetailsEntry<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let settings = user_settings(cx);@@ -534,7 +531,7 @@ impl<S: 'static + Send + Sync> ListSeparator<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);div().h_px().w_full().bg(theme.border)@@ -574,7 +571,7 @@ impl<S: 'static + Send + Sync> List<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let is_toggleable = self.toggleable != Toggleable::NotToggleable;let is_toggled = Toggleable::is_toggled(&self.toggleable);diff --git a/crates/ui2/src/components/modal.rs b/crates/ui2/src/components/modal.rsindex 154df4e862e..63e7bc7c1ad 100644--- a/crates/ui2/src/components/modal.rs+++ b/crates/ui2/src/components/modal.rs@@ -42,7 +42,7 @@ impl<S: 'static + Send + Sync> Modal<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);v_stack()diff --git a/crates/ui2/src/components/multi_buffer.rs b/crates/ui2/src/components/multi_buffer.rsindex 568302b5595..3bd3057d659 100644--- a/crates/ui2/src/components/multi_buffer.rs+++ b/crates/ui2/src/components/multi_buffer.rs@@ -17,7 +17,7 @@ impl<S: 'static + Send + Sync + Clone> MultiBuffer<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);v_stack()@@ -62,11 +62,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);Story::container(cx)diff --git a/crates/ui2/src/components/notification_toast.rs b/crates/ui2/src/components/notification_toast.rsindex afcef8fb203..cf68738a7ea 100644--- a/crates/ui2/src/components/notification_toast.rs+++ b/crates/ui2/src/components/notification_toast.rs@@ -28,7 +28,7 @@ impl<S: 'static + Send + Sync + Clone> NotificationToast<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);h_stack()diff --git a/crates/ui2/src/components/notifications_panel.rs b/crates/ui2/src/components/notifications_panel.rsindex fd0445d0070..1937c8e0609 100644--- a/crates/ui2/src/components/notifications_panel.rs+++ b/crates/ui2/src/components/notifications_panel.rs@@ -17,7 +17,7 @@ impl<S: 'static + Send + Sync> NotificationsPanel<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);div()@@ -70,11 +70,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, NotificationsPanel<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/palette.rs b/crates/ui2/src/components/palette.rsindex 9787086cd6d..b7cb7033bc9 100644--- a/crates/ui2/src/components/palette.rs+++ b/crates/ui2/src/components/palette.rs@@ -46,7 +46,7 @@ impl<S: 'static + Send + Sync> Palette<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);v_stack()@@ -135,7 +135,7 @@ impl<S: 'static + Send + Sync> PaletteItem<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {div().flex().flex_row()@@ -172,11 +172,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, Palette<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/panel.rs b/crates/ui2/src/components/panel.rsindex 0c52a7a12ad..67b00d881bd 100644--- a/crates/ui2/src/components/panel.rs+++ b/crates/ui2/src/components/panel.rs@@ -96,7 +96,7 @@ impl<S: 'static + Send + Sync> Panel<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let current_size = self.width.unwrap_or(self.initial_width);@@ -148,11 +148,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, Panel<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/panes.rs b/crates/ui2/src/components/panes.rsindex 229de3caa43..f100723f915 100644--- a/crates/ui2/src/components/panes.rs+++ b/crates/ui2/src/components/panes.rs@@ -101,7 +101,7 @@ impl<V: 'static + Send + Sync> PaneGroup<V> {}}- fn render(&mut self, view: &mut V, cx: &mut ViewContext<V>) -> impl Element<V> {+ fn render(&mut self, view: &mut V, cx: &mut ViewContext<V>) -> impl IntoAnyElement<V> {let theme = theme(cx);if !self.panes.is_empty() {diff --git a/crates/ui2/src/components/player_stack.rs b/crates/ui2/src/components/player_stack.rsindex 0ada98aa3f5..6ca16d14e62 100644--- a/crates/ui2/src/components/player_stack.rs+++ b/crates/ui2/src/components/player_stack.rs@@ -17,7 +17,7 @@ impl<S: 'static + Send + Sync> PlayerStack<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let player = self.player_with_call_status.get_player();self.player_with_call_status.get_call_status();diff --git a/crates/ui2/src/components/project_panel.rs b/crates/ui2/src/components/project_panel.rsindex 8b52a1b89aa..5a4591cadde 100644--- a/crates/ui2/src/components/project_panel.rs+++ b/crates/ui2/src/components/project_panel.rs@@ -19,7 +19,7 @@ impl<S: 'static + Send + Sync> ProjectPanel<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);div()@@ -79,11 +79,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, ProjectPanel<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/recent_projects.rs b/crates/ui2/src/components/recent_projects.rsindex 16c019be533..bab96444a56 100644--- a/crates/ui2/src/components/recent_projects.rs+++ b/crates/ui2/src/components/recent_projects.rs@@ -17,7 +17,7 @@ impl<S: 'static + Send + Sync + Clone> RecentProjects<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {div().id(self.id.clone()).child(Palette::new("palette").items(vec![@@ -56,11 +56,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, RecentProjects<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/status_bar.rs b/crates/ui2/src/components/status_bar.rsindex 5eeeb841ef6..786b3670a00 100644--- a/crates/ui2/src/components/status_bar.rs+++ b/crates/ui2/src/components/status_bar.rs@@ -86,7 +86,7 @@ impl StatusBar {&mut self,view: &mut Workspace,cx: &mut ViewContext<Workspace>,- ) -> impl Element<Workspace> {+ ) -> impl IntoAnyElement<Workspace> {let theme = theme(cx);div()@@ -101,7 +101,11 @@ impl StatusBar {.child(self.right_tools(view, cx))}- fn left_tools(&self, workspace: &mut Workspace, cx: &WindowContext) -> impl Element<Workspace> {+ fn left_tools(+ &self,+ workspace: &mut Workspace,+ cx: &WindowContext,+ ) -> impl IntoAnyElement<Workspace> {div().flex().items_center()@@ -132,7 +136,7 @@ impl StatusBar {&self,workspace: &mut Workspace,cx: &WindowContext,- ) -> impl Element<Workspace> {+ ) -> impl IntoAnyElement<Workspace> {div().flex().items_center()diff --git a/crates/ui2/src/components/tab.rs b/crates/ui2/src/components/tab.rsindex 4bfd21248fc..daff5ea66c6 100644--- a/crates/ui2/src/components/tab.rs+++ b/crates/ui2/src/components/tab.rs@@ -81,7 +81,7 @@ impl<S: 'static + Send + Sync + Clone> Tab<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let has_fs_conflict = self.fs_status == FileSystemStatus::Conflict;let is_deleted = self.fs_status == FileSystemStatus::Deleted;@@ -188,11 +188,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let git_statuses = GitStatus::iter();let fs_statuses = FileSystemStatus::iter();diff --git a/crates/ui2/src/components/tab_bar.rs b/crates/ui2/src/components/tab_bar.rsindex 0cc9409c048..4e49ef289aa 100644--- a/crates/ui2/src/components/tab_bar.rs+++ b/crates/ui2/src/components/tab_bar.rs@@ -27,7 +27,7 @@ impl<S: 'static + Send + Sync + Clone> TabBar<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let (can_navigate_back, can_navigate_forward) = self.can_navigate;@@ -112,11 +112,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, TabBar<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/terminal.rs b/crates/ui2/src/components/terminal.rsindex 480c1a5da6a..2061d42ad2c 100644--- a/crates/ui2/src/components/terminal.rs+++ b/crates/ui2/src/components/terminal.rs@@ -17,7 +17,7 @@ impl<S: 'static + Send + Sync + Clone> Terminal<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let can_navigate_back = true;@@ -105,11 +105,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, Terminal<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/theme_selector.rs b/crates/ui2/src/components/theme_selector.rsindex cb1b491d87e..0758cf643b9 100644--- a/crates/ui2/src/components/theme_selector.rs+++ b/crates/ui2/src/components/theme_selector.rs@@ -17,7 +17,7 @@ impl<S: 'static + Send + Sync> ThemeSelector<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {div().child(Palette::new(self.id.clone()).items(vec![@@ -61,11 +61,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, ThemeSelector<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/title_bar.rs b/crates/ui2/src/components/title_bar.rsindex 68661d0ea20..a20c7877b2a 100644--- a/crates/ui2/src/components/title_bar.rs+++ b/crates/ui2/src/components/title_bar.rs@@ -87,7 +87,7 @@ impl TitleBar {)}- fn render(&mut self, cx: &mut ViewContext<Self>) -> impl Element<Self> {+ fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoAnyElement<Self> {let theme = theme(cx);let settings = user_settings(cx);@@ -204,7 +204,7 @@ mod stories {)}- fn render(&mut self, cx: &mut ViewContext<Self>) -> impl Element<Self> {+ fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoAnyElement<Self> {Story::container(cx).child(Story::title_for::<_, TitleBar>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/toast.rs b/crates/ui2/src/components/toast.rsindex 9318b12eec2..faf58467a26 100644--- a/crates/ui2/src/components/toast.rs+++ b/crates/ui2/src/components/toast.rs@@ -36,7 +36,7 @@ impl<S: 'static + Send + Sync> Toast<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let mut div = div();@@ -90,7 +90,7 @@ mod stories {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, Toast<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/toolbar.rs b/crates/ui2/src/components/toolbar.rsindex 51ec6ee4976..74b2c925781 100644--- a/crates/ui2/src/components/toolbar.rs+++ b/crates/ui2/src/components/toolbar.rs@@ -54,7 +54,7 @@ impl<S: 'static + Send + Sync> Toolbar<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);div()@@ -92,11 +92,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);Story::container(cx)diff --git a/crates/ui2/src/components/traffic_lights.rs b/crates/ui2/src/components/traffic_lights.rsindex e8750759428..8ac76439f82 100644--- a/crates/ui2/src/components/traffic_lights.rs+++ b/crates/ui2/src/components/traffic_lights.rs@@ -25,7 +25,7 @@ impl<S: 'static + Send + Sync> TrafficLight<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let fill = match (self.window_has_focus, self.color) {@@ -58,7 +58,7 @@ impl<S: 'static + Send + Sync> TrafficLights<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {div().flex().items_center()@@ -99,11 +99,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, TrafficLights<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/components/workspace.rs b/crates/ui2/src/components/workspace.rsindex 92ea93ef026..34158c99185 100644--- a/crates/ui2/src/components/workspace.rs+++ b/crates/ui2/src/components/workspace.rs@@ -174,7 +174,7 @@ impl Workspace {view(cx.entity(|cx| Self::new(cx)), Self::render)}- pub fn render(&mut self, cx: &mut ViewContext<Self>) -> impl Element<Self> {+ pub fn render(&mut self, cx: &mut ViewContext<Self>) -> impl IntoAnyElement<Self> {let theme = old_theme(cx).clone();// HACK: This should happen inside of `debug_toggle_user_settings`, butdiff --git a/crates/ui2/src/elements/avatar.rs b/crates/ui2/src/elements/avatar.rsindex 0bc1ccad227..555818a87cf 100644--- a/crates/ui2/src/elements/avatar.rs+++ b/crates/ui2/src/elements/avatar.rs@@ -25,7 +25,7 @@ impl<S: 'static + Send + Sync> Avatar<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let mut img = img();@@ -63,11 +63,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, Avatar<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/elements/button.rs b/crates/ui2/src/elements/button.rsindex 363f70ddb42..9f399ea331e 100644--- a/crates/ui2/src/elements/button.rs+++ b/crates/ui2/src/elements/button.rs@@ -150,11 +150,7 @@ impl<S: 'static + Send + Sync> Button<S> {self.icon.map(|i| IconElement::new(i).color(icon_color))}- pub fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ pub fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let icon_color = self.icon_color();let mut button = h_stack()@@ -211,7 +207,7 @@ impl<S: 'static + Send + Sync> ButtonGroup<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let mut el = h_stack().text_size(ui_size(cx, 1.));for button in &mut self.buttons {@@ -246,11 +242,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let states = InteractionState::iter();Story::container(cx)diff --git a/crates/ui2/src/elements/details.rs b/crates/ui2/src/elements/details.rsindex e7df25f6a39..ea05436401a 100644--- a/crates/ui2/src/elements/details.rs+++ b/crates/ui2/src/elements/details.rs@@ -30,7 +30,7 @@ impl<S: 'static + Send + Sync> Details<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);v_stack()@@ -66,11 +66,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, Details<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/elements/icon.rs b/crates/ui2/src/elements/icon.rsindex d20f262fbcb..2a0f6b3a0ba 100644--- a/crates/ui2/src/elements/icon.rs+++ b/crates/ui2/src/elements/icon.rs@@ -176,7 +176,7 @@ impl<S: 'static + Send + Sync> IconElement<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let fill = self.color.color(cx);let svg_size = match self.size {IconSize::Small => ui_size(cx, 12. / 14.),@@ -214,11 +214,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let icons = Icon::iter();Story::container(cx)diff --git a/crates/ui2/src/elements/input.rs b/crates/ui2/src/elements/input.rsindex 56d81a0831f..142acc88709 100644--- a/crates/ui2/src/elements/input.rs+++ b/crates/ui2/src/elements/input.rs@@ -60,7 +60,7 @@ impl<S: 'static + Send + Sync> Input<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let (input_bg, input_hover_bg, input_active_bg) = match self.variant {@@ -132,11 +132,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, Input<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/elements/label.rs b/crates/ui2/src/elements/label.rsindex d29ab8a5ee4..f8d4a8d1152 100644--- a/crates/ui2/src/elements/label.rs+++ b/crates/ui2/src/elements/label.rs@@ -83,7 +83,7 @@ impl<S: 'static + Send + Sync> Label<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {div().when(self.strikethrough, |this| {this.relative().child(@@ -135,7 +135,7 @@ impl<S: 'static + Send + Sync> HighlightedLabel<S> {self}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);let highlight_color = theme.text_accent;@@ -223,11 +223,7 @@ mod stories {}}- fn render(- &mut self,- _view: &mut S,- cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {Story::container(cx).child(Story::title_for::<_, Label<S>>(cx)).child(Story::label(cx, "Default"))diff --git a/crates/ui2/src/elements/tool_divider.rs b/crates/ui2/src/elements/tool_divider.rsindex 46b790e6bb1..f73c8953ee6 100644--- a/crates/ui2/src/elements/tool_divider.rs+++ b/crates/ui2/src/elements/tool_divider.rs@@ -14,7 +14,7 @@ impl<S: 'static + Send + Sync> ToolDivider<S> {}}- fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl Element<S> {+ fn render(&mut self, _view: &mut S, cx: &mut ViewContext<S>) -> impl IntoAnyElement<S> {let theme = theme(cx);div().w_px().h_3().bg(theme.border)diff --git a/crates/ui2/src/story.rs b/crates/ui2/src/story.rsindex 9fc6a11f197..c4bf9c3caad 100644--- a/crates/ui2/src/story.rs+++ b/crates/ui2/src/story.rs@@ -21,7 +21,7 @@ impl Story {pub fn title<S: 'static + Send + Sync>(cx: &mut ViewContext<S>,title: &str,- ) -> impl Element<S> {+ ) -> impl IntoAnyElement<S> {let theme = theme(cx);div()@@ -32,14 +32,14 @@ impl Story {pub fn title_for<S: 'static + Send + Sync, T>(cx: &mut ViewContext<S>,- ) -> impl Element<S> {+ ) -> impl IntoAnyElement<S> {Self::title(cx, std::any::type_name::<T>())}pub fn label<S: 'static + Send + Sync>(cx: &mut ViewContext<S>,label: &str,- ) -> impl Element<S> {+ ) -> impl IntoAnyElement<S> {let theme = theme(cx);div()