Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove unneeded constructors for stories
Marshall Bowers61694bba6a51
diff --git a/crates/storybook2/src/stories/z_index.rs b/crates/storybook2/src/stories/z_index.rsindex 15f66fc26a2..f17280405ad 100644--- a/crates/storybook2/src/stories/z_index.rs+++ b/crates/storybook2/src/stories/z_index.rs@@ -10,10 +10,6 @@ use crate::story::Story;pub struct ZIndexStory;impl ZIndexStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title(cx, "z-index"))diff --git a/crates/storybook2/src/story_selector.rs b/crates/storybook2/src/story_selector.rsindex 5f60ad14ead..ed6822cb114 100644--- a/crates/storybook2/src/story_selector.rs+++ b/crates/storybook2/src/story_selector.rs@@ -27,31 +27,16 @@ pub enum ElementStory {impl ElementStory {pub fn story(&self, cx: &mut WindowContext) -> AnyView {match self {- Self::Avatar => {- view(cx.entity(|cx| ()), |_, _| ui::AvatarStory::new().render()).into_any()- }- Self::Button => {- view(cx.entity(|cx| ()), |_, _| ui::ButtonStory::new().render()).into_any()- }- Self::Details => view(cx.entity(|cx| ()), |_, _| {- ui::DetailsStory::new().render()- })- .into_any(),+ Self::Avatar => view(cx.entity(|cx| ()), |_, _| ui::AvatarStory.render()).into_any(),+ Self::Button => view(cx.entity(|cx| ()), |_, _| ui::ButtonStory.render()).into_any(),+ Self::Details => view(cx.entity(|cx| ()), |_, _| ui::DetailsStory.render()).into_any(),Self::Focus => FocusStory::view(cx).into_any(),- Self::Icon => {- view(cx.entity(|cx| ()), |_, _| ui::IconStory::new().render()).into_any()- }- Self::Input => {- view(cx.entity(|cx| ()), |_, _| ui::InputStory::new().render()).into_any()- }- Self::Label => {- view(cx.entity(|cx| ()), |_, _| ui::LabelStory::new().render()).into_any()- }+ Self::Icon => view(cx.entity(|cx| ()), |_, _| ui::IconStory.render()).into_any(),+ Self::Input => view(cx.entity(|cx| ()), |_, _| ui::InputStory.render()).into_any(),+ Self::Label => view(cx.entity(|cx| ()), |_, _| ui::LabelStory.render()).into_any(),Self::Scroll => ScrollStory::view(cx).into_any(),Self::Text => TextStory::view(cx).into_any(),- Self::ZIndex => {- view(cx.entity(|cx| ()), |_, _| ZIndexStory::new().render()).into_any()- }+ Self::ZIndex => view(cx.entity(|cx| ()), |_, _| ZIndexStory.render()).into_any(),}}}@@ -90,96 +75,67 @@ pub enum ComponentStory {impl ComponentStory {pub fn story(&self, cx: &mut WindowContext) -> AnyView {match self {- Self::AssistantPanel => view(cx.entity(|cx| ()), |_, _| {- ui::AssistantPanelStory::new().render()- })- .into_any(),- Self::Buffer => {- view(cx.entity(|cx| ()), |_, _| ui::BufferStory::new().render()).into_any()+ Self::AssistantPanel => {+ view(cx.entity(|cx| ()), |_, _| ui::AssistantPanelStory.render()).into_any()+ }+ Self::Buffer => view(cx.entity(|cx| ()), |_, _| ui::BufferStory.render()).into_any(),+ Self::Breadcrumb => {+ view(cx.entity(|cx| ()), |_, _| ui::BreadcrumbStory.render()).into_any()+ }+ Self::ChatPanel => {+ view(cx.entity(|cx| ()), |_, _| ui::ChatPanelStory.render()).into_any()+ }+ Self::CollabPanel => {+ view(cx.entity(|cx| ()), |_, _| ui::CollabPanelStory.render()).into_any()+ }+ Self::CommandPalette => {+ view(cx.entity(|cx| ()), |_, _| ui::CommandPaletteStory.render()).into_any()+ }+ Self::ContextMenu => {+ view(cx.entity(|cx| ()), |_, _| ui::ContextMenuStory.render()).into_any()+ }+ Self::Facepile => {+ view(cx.entity(|cx| ()), |_, _| ui::FacepileStory.render()).into_any()+ }+ Self::Keybinding => {+ view(cx.entity(|cx| ()), |_, _| ui::KeybindingStory.render()).into_any()}- Self::Breadcrumb => view(cx.entity(|cx| ()), |_, _| {- ui::BreadcrumbStory::new().render()- })- .into_any(),- Self::ChatPanel => view(cx.entity(|cx| ()), |_, _| {- ui::ChatPanelStory::new().render()- })- .into_any(),- Self::CollabPanel => view(cx.entity(|cx| ()), |_, _| {- ui::CollabPanelStory::new().render()- })- .into_any(),- Self::CommandPalette => view(cx.entity(|cx| ()), |_, _| {- ui::CommandPaletteStory::new().render()- })- .into_any(),- Self::ContextMenu => view(cx.entity(|cx| ()), |_, _| {- ui::ContextMenuStory::new().render()- })- .into_any(),- Self::Facepile => view(cx.entity(|cx| ()), |_, _| {- ui::FacepileStory::new().render()- })- .into_any(),- Self::Keybinding => view(cx.entity(|cx| ()), |_, _| {- ui::KeybindingStory::new().render()- })- .into_any(),Self::LanguageSelector => view(cx.entity(|cx| ()), |_, _| {- ui::LanguageSelectorStory::new().render()- })- .into_any(),- Self::MultiBuffer => view(cx.entity(|cx| ()), |_, _| {- ui::MultiBufferStory::new().render()+ ui::LanguageSelectorStory.render()}).into_any(),+ Self::MultiBuffer => {+ view(cx.entity(|cx| ()), |_, _| ui::MultiBufferStory.render()).into_any()+ }Self::NotificationsPanel => view(cx.entity(|cx| ()), |_, _| {- ui::NotificationsPanelStory::new().render()+ ui::NotificationsPanelStory.render()}).into_any(),- Self::Palette => view(cx.entity(|cx| ()), |_, _| {- ui::PaletteStory::new().render()- })- .into_any(),- Self::Panel => {- view(cx.entity(|cx| ()), |_, _| ui::PanelStory::new().render()).into_any()+ Self::Palette => view(cx.entity(|cx| ()), |_, _| ui::PaletteStory.render()).into_any(),+ Self::Panel => view(cx.entity(|cx| ()), |_, _| ui::PanelStory.render()).into_any(),+ Self::ProjectPanel => {+ view(cx.entity(|cx| ()), |_, _| ui::ProjectPanelStory.render()).into_any()}- Self::ProjectPanel => view(cx.entity(|cx| ()), |_, _| {- ui::ProjectPanelStory::new().render()- })- .into_any(),- Self::RecentProjects => view(cx.entity(|cx| ()), |_, _| {- ui::RecentProjectsStory::new().render()- })- .into_any(),- Self::Tab => view(cx.entity(|cx| ()), |_, _| ui::TabStory::new().render()).into_any(),- Self::TabBar => {- view(cx.entity(|cx| ()), |_, _| ui::TabBarStory::new().render()).into_any()+ Self::RecentProjects => {+ view(cx.entity(|cx| ()), |_, _| ui::RecentProjectsStory.render()).into_any()+ }+ Self::Tab => view(cx.entity(|cx| ()), |_, _| ui::TabStory.render()).into_any(),+ Self::TabBar => view(cx.entity(|cx| ()), |_, _| ui::TabBarStory.render()).into_any(),+ Self::Terminal => {+ view(cx.entity(|cx| ()), |_, _| ui::TerminalStory.render()).into_any()+ }+ Self::ThemeSelector => {+ view(cx.entity(|cx| ()), |_, _| ui::ThemeSelectorStory.render()).into_any()}- Self::Terminal => view(cx.entity(|cx| ()), |_, _| {- ui::TerminalStory::new().render()- })- .into_any(),- Self::ThemeSelector => view(cx.entity(|cx| ()), |_, _| {- ui::ThemeSelectorStory::new().render()- })- .into_any(),Self::TitleBar => ui::TitleBarStory::view(cx).into_any(),- Self::Toast => {- view(cx.entity(|cx| ()), |_, _| ui::ToastStory::new().render()).into_any()+ Self::Toast => view(cx.entity(|cx| ()), |_, _| ui::ToastStory.render()).into_any(),+ Self::Toolbar => view(cx.entity(|cx| ()), |_, _| ui::ToolbarStory.render()).into_any(),+ Self::TrafficLights => {+ view(cx.entity(|cx| ()), |_, _| ui::TrafficLightsStory.render()).into_any()+ }+ Self::Copilot => {+ view(cx.entity(|cx| ()), |_, _| ui::CopilotModalStory.render()).into_any()}- Self::Toolbar => view(cx.entity(|cx| ()), |_, _| {- ui::ToolbarStory::new().render()- })- .into_any(),- Self::TrafficLights => view(cx.entity(|cx| ()), |_, _| {- ui::TrafficLightsStory::new().render()- })- .into_any(),- Self::Copilot => view(cx.entity(|cx| ()), |_, _| {- ui::CopilotModalStory::new().render()- })- .into_any(),Self::Workspace => ui::WorkspaceStory::view(cx).into_any(),}}diff --git a/crates/ui2/src/components/assistant_panel.rs b/crates/ui2/src/components/assistant_panel.rsindex defd05f5009..9b2abd5c174 100644--- a/crates/ui2/src/components/assistant_panel.rs+++ b/crates/ui2/src/components/assistant_panel.rs@@ -81,13 +81,9 @@ mod stories {use super::*;#[derive(Component)]- pub struct AssistantPanelStory {}+ pub struct AssistantPanelStory;impl AssistantPanelStory {- pub fn new() -> Self {- Self {}- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, AssistantPanel>(cx))diff --git a/crates/ui2/src/components/breadcrumb.rs b/crates/ui2/src/components/breadcrumb.rsindex 37660b5b0b9..4a2cebcb803 100644--- a/crates/ui2/src/components/breadcrumb.rs+++ b/crates/ui2/src/components/breadcrumb.rs@@ -83,10 +83,6 @@ mod stories {pub struct BreadcrumbStory;impl BreadcrumbStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self,view_state: &mut V,diff --git a/crates/ui2/src/components/buffer.rs b/crates/ui2/src/components/buffer.rsindex 8250a6b9ee8..57543977192 100644--- a/crates/ui2/src/components/buffer.rs+++ b/crates/ui2/src/components/buffer.rs@@ -246,10 +246,6 @@ mod stories {pub struct BufferStory;impl BufferStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {let theme = theme(cx);diff --git a/crates/ui2/src/components/chat_panel.rs b/crates/ui2/src/components/chat_panel.rsindex 10e9e2a7068..d4fddebc1bc 100644--- a/crates/ui2/src/components/chat_panel.rs+++ b/crates/ui2/src/components/chat_panel.rs@@ -117,10 +117,6 @@ mod stories {pub struct ChatPanelStory;impl ChatPanelStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, ChatPanel>(cx))diff --git a/crates/ui2/src/components/collab_panel.rs b/crates/ui2/src/components/collab_panel.rsindex b8d0510f8fc..d14c1fec1e0 100644--- a/crates/ui2/src/components/collab_panel.rs+++ b/crates/ui2/src/components/collab_panel.rs@@ -97,10 +97,6 @@ mod stories {pub struct CollabPanelStory;impl CollabPanelStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, CollabPanel>(cx))diff --git a/crates/ui2/src/components/command_palette.rs b/crates/ui2/src/components/command_palette.rsindex 038dc7f460b..71ca5bc41b4 100644--- a/crates/ui2/src/components/command_palette.rs+++ b/crates/ui2/src/components/command_palette.rs@@ -35,10 +35,6 @@ mod stories {pub struct CommandPaletteStory;impl CommandPaletteStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, CommandPalette>(cx))diff --git a/crates/ui2/src/components/context_menu.rs b/crates/ui2/src/components/context_menu.rsindex f39df6879dc..f2a5557f17c 100644--- a/crates/ui2/src/components/context_menu.rs+++ b/crates/ui2/src/components/context_menu.rs@@ -76,10 +76,6 @@ mod stories {pub struct ContextMenuStory;impl ContextMenuStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, ContextMenu>(cx))diff --git a/crates/ui2/src/components/copilot.rs b/crates/ui2/src/components/copilot.rsindex a33dc1a0b78..7a565d09072 100644--- a/crates/ui2/src/components/copilot.rs+++ b/crates/ui2/src/components/copilot.rs@@ -33,10 +33,6 @@ mod stories {pub struct CopilotModalStory;impl CopilotModalStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, CopilotModal>(cx))diff --git a/crates/ui2/src/components/facepile.rs b/crates/ui2/src/components/facepile.rsindex 1d0f435eacf..ab1ae471393 100644--- a/crates/ui2/src/components/facepile.rs+++ b/crates/ui2/src/components/facepile.rs@@ -39,10 +39,6 @@ mod stories {pub struct FacepileStory;impl FacepileStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {let players = static_players();diff --git a/crates/ui2/src/components/icon_button.rs b/crates/ui2/src/components/icon_button.rsindex b591c937b00..980a1c98aac 100644--- a/crates/ui2/src/components/icon_button.rs+++ b/crates/ui2/src/components/icon_button.rs@@ -57,7 +57,10 @@ impl<V: 'static> IconButton<V> {self}- pub fn on_click(mut self, handler: impl 'static + Fn(&mut V, &mut ViewContext<V>) + Send + Sync) -> Self {+ pub fn on_click(+ mut self,+ handler: impl 'static + Fn(&mut V, &mut ViewContext<V>) + Send + Sync,+ ) -> Self {self.handlers.click = Some(Arc::new(handler));self}diff --git a/crates/ui2/src/components/keybinding.rs b/crates/ui2/src/components/keybinding.rsindex 822cdd1dcb6..ec29e7a95d2 100644--- a/crates/ui2/src/components/keybinding.rs+++ b/crates/ui2/src/components/keybinding.rs@@ -168,10 +168,6 @@ mod stories {pub struct KeybindingStory;impl KeybindingStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {let all_modifier_permutations = ModifierKey::iter().permutations(2);diff --git a/crates/ui2/src/components/language_selector.rs b/crates/ui2/src/components/language_selector.rsindex 92af80cd76c..f75dcf3eaff 100644--- a/crates/ui2/src/components/language_selector.rs+++ b/crates/ui2/src/components/language_selector.rs@@ -46,10 +46,6 @@ mod stories {pub struct LanguageSelectorStory;impl LanguageSelectorStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, LanguageSelector>(cx))diff --git a/crates/ui2/src/components/multi_buffer.rs b/crates/ui2/src/components/multi_buffer.rsindex bbf893f8eff..e5051fc5b81 100644--- a/crates/ui2/src/components/multi_buffer.rs+++ b/crates/ui2/src/components/multi_buffer.rs@@ -48,10 +48,6 @@ mod stories {pub struct MultiBufferStory;impl MultiBufferStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {let theme = theme(cx);diff --git a/crates/ui2/src/components/notifications_panel.rs b/crates/ui2/src/components/notifications_panel.rsindex 3e0c3887c5a..68fe6d4bd0a 100644--- a/crates/ui2/src/components/notifications_panel.rs+++ b/crates/ui2/src/components/notifications_panel.rs@@ -56,10 +56,6 @@ mod stories {pub struct NotificationsPanelStory;impl NotificationsPanelStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, NotificationsPanel>(cx))diff --git a/crates/ui2/src/components/palette.rs b/crates/ui2/src/components/palette.rsindex 97f3df0b7c8..a74c9e36721 100644--- a/crates/ui2/src/components/palette.rs+++ b/crates/ui2/src/components/palette.rs@@ -160,10 +160,6 @@ mod stories {pub struct PaletteStory;impl PaletteStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, Palette>(cx))diff --git a/crates/ui2/src/components/panel.rs b/crates/ui2/src/components/panel.rsindex 7da2dab09a6..40129dbd761 100644--- a/crates/ui2/src/components/panel.rs+++ b/crates/ui2/src/components/panel.rs@@ -136,10 +136,6 @@ mod stories {pub struct PanelStory;impl PanelStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, Panel<V>>(cx))diff --git a/crates/ui2/src/components/project_panel.rs b/crates/ui2/src/components/project_panel.rsindex 61458ad4a06..9f15102acc8 100644--- a/crates/ui2/src/components/project_panel.rs+++ b/crates/ui2/src/components/project_panel.rs@@ -65,10 +65,6 @@ mod stories {pub struct ProjectPanelStory;impl ProjectPanelStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, ProjectPanel>(cx))diff --git a/crates/ui2/src/components/recent_projects.rs b/crates/ui2/src/components/recent_projects.rsindex 81da295c3a7..cd7c22eecb8 100644--- a/crates/ui2/src/components/recent_projects.rs+++ b/crates/ui2/src/components/recent_projects.rs@@ -42,10 +42,6 @@ mod stories {pub struct RecentProjectsStory;impl RecentProjectsStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, RecentProjects>(cx))diff --git a/crates/ui2/src/components/tab.rs b/crates/ui2/src/components/tab.rsindex 45c57ae4842..6133906f272 100644--- a/crates/ui2/src/components/tab.rs+++ b/crates/ui2/src/components/tab.rs@@ -176,10 +176,6 @@ mod stories {pub struct TabStory;impl TabStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {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 4c27d85f031..cffdc09026c 100644--- a/crates/ui2/src/components/tab_bar.rs+++ b/crates/ui2/src/components/tab_bar.rs@@ -100,10 +100,6 @@ mod stories {pub struct TabBarStory;impl TabBarStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, TabBar>(cx))diff --git a/crates/ui2/src/components/terminal.rs b/crates/ui2/src/components/terminal.rsindex 4a38d205230..b7c8c5d75d7 100644--- a/crates/ui2/src/components/terminal.rs+++ b/crates/ui2/src/components/terminal.rs@@ -91,10 +91,6 @@ mod stories {pub struct TerminalStory;impl TerminalStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, Terminal>(cx))diff --git a/crates/ui2/src/components/theme_selector.rs b/crates/ui2/src/components/theme_selector.rsindex c1e1527d6c2..b5fcd17d2fd 100644--- a/crates/ui2/src/components/theme_selector.rs+++ b/crates/ui2/src/components/theme_selector.rs@@ -47,10 +47,6 @@ mod stories {pub struct ThemeSelectorStory;impl ThemeSelectorStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, ThemeSelector>(cx))diff --git a/crates/ui2/src/components/toast.rs b/crates/ui2/src/components/toast.rsindex 626a79b3672..dca6f7c28ad 100644--- a/crates/ui2/src/components/toast.rs+++ b/crates/ui2/src/components/toast.rs@@ -80,10 +80,6 @@ mod stories {pub struct ToastStory;impl ToastStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, Toast<V>>(cx))diff --git a/crates/ui2/src/components/toolbar.rs b/crates/ui2/src/components/toolbar.rsindex b9da93b55dc..a833090c1cc 100644--- a/crates/ui2/src/components/toolbar.rs+++ b/crates/ui2/src/components/toolbar.rs@@ -83,10 +83,6 @@ mod stories {pub struct ToolbarStory;impl ToolbarStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {let theme = theme(cx);diff --git a/crates/ui2/src/components/traffic_lights.rs b/crates/ui2/src/components/traffic_lights.rsindex f9bba2828a8..320e7e68fd5 100644--- a/crates/ui2/src/components/traffic_lights.rs+++ b/crates/ui2/src/components/traffic_lights.rs@@ -85,10 +85,6 @@ mod stories {pub struct TrafficLightsStory;impl TrafficLightsStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, TrafficLights>(cx))diff --git a/crates/ui2/src/elements/avatar.rs b/crates/ui2/src/elements/avatar.rsindex 3d540ec9ee2..87133209a27 100644--- a/crates/ui2/src/elements/avatar.rs+++ b/crates/ui2/src/elements/avatar.rs@@ -51,10 +51,6 @@ mod stories {pub struct AvatarStory;impl AvatarStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, Avatar>(cx))diff --git a/crates/ui2/src/elements/button.rs b/crates/ui2/src/elements/button.rsindex b54944b45b8..15d65dc5d22 100644--- a/crates/ui2/src/elements/button.rs+++ b/crates/ui2/src/elements/button.rs@@ -230,10 +230,6 @@ mod stories {pub struct ButtonStory;impl ButtonStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {let states = InteractionState::iter();diff --git a/crates/ui2/src/elements/details.rs b/crates/ui2/src/elements/details.rsindex 2ff87670662..f89cfb53db4 100644--- a/crates/ui2/src/elements/details.rs+++ b/crates/ui2/src/elements/details.rs@@ -54,10 +54,6 @@ mod stories {pub struct DetailsStory;impl DetailsStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, Details<V>>(cx))diff --git a/crates/ui2/src/elements/icon.rs b/crates/ui2/src/elements/icon.rsindex 7816086a78c..b47e4c66085 100644--- a/crates/ui2/src/elements/icon.rs+++ b/crates/ui2/src/elements/icon.rs@@ -202,10 +202,6 @@ mod stories {pub struct IconStory;impl IconStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {let icons = Icon::iter();diff --git a/crates/ui2/src/elements/input.rs b/crates/ui2/src/elements/input.rsindex 557a8c5f83c..79a09e0ba26 100644--- a/crates/ui2/src/elements/input.rs+++ b/crates/ui2/src/elements/input.rs@@ -120,10 +120,6 @@ mod stories {pub struct InputStory;impl InputStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, Input>(cx))diff --git a/crates/ui2/src/elements/label.rs b/crates/ui2/src/elements/label.rsindex 87076441ae3..f4014d5922d 100644--- a/crates/ui2/src/elements/label.rs+++ b/crates/ui2/src/elements/label.rs@@ -209,10 +209,6 @@ mod stories {pub struct LabelStory;impl LabelStory {- pub fn new() -> Self {- Self- }-fn render<V: 'static>(self, _view: &mut V, cx: &mut ViewContext<V>) -> impl Component<V> {Story::container(cx).child(Story::title_for::<_, Label>(cx))