diff --git a/crates/storybook2/src/stories/z_index.rs b/crates/storybook2/src/stories/z_index.rs index 15f66fc26a..f17280405a 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title(cx, "z-index")) diff --git a/crates/storybook2/src/story_selector.rs b/crates/storybook2/src/story_selector.rs index 5f60ad14ea..ed6822cb11 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.rs index defd05f500..9b2abd5c17 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, AssistantPanel>(cx)) diff --git a/crates/ui2/src/components/breadcrumb.rs b/crates/ui2/src/components/breadcrumb.rs index 37660b5b0b..4a2cebcb80 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( self, view_state: &mut V, diff --git a/crates/ui2/src/components/buffer.rs b/crates/ui2/src/components/buffer.rs index 8250a6b9ee..5754397719 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { let theme = theme(cx); diff --git a/crates/ui2/src/components/chat_panel.rs b/crates/ui2/src/components/chat_panel.rs index 10e9e2a706..d4fddebc1b 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { 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.rs index b8d0510f8f..d14c1fec1e 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { 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.rs index 038dc7f460..71ca5bc41b 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { 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.rs index f39df6879d..f2a5557f17 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, ContextMenu>(cx)) diff --git a/crates/ui2/src/components/copilot.rs b/crates/ui2/src/components/copilot.rs index a33dc1a0b7..7a565d0907 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, CopilotModal>(cx)) diff --git a/crates/ui2/src/components/facepile.rs b/crates/ui2/src/components/facepile.rs index 1d0f435eac..ab1ae47139 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { let players = static_players(); diff --git a/crates/ui2/src/components/icon_button.rs b/crates/ui2/src/components/icon_button.rs index b591c937b0..980a1c98aa 100644 --- a/crates/ui2/src/components/icon_button.rs +++ b/crates/ui2/src/components/icon_button.rs @@ -57,7 +57,10 @@ impl IconButton { self } - pub fn on_click(mut self, handler: impl 'static + Fn(&mut V, &mut ViewContext) + Send + Sync) -> Self { + pub fn on_click( + mut self, + handler: impl 'static + Fn(&mut V, &mut ViewContext) + 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.rs index 822cdd1dcb..ec29e7a95d 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { 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.rs index 92af80cd76..f75dcf3eaf 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { 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.rs index bbf893f8ef..e5051fc5b8 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { let theme = theme(cx); diff --git a/crates/ui2/src/components/notifications_panel.rs b/crates/ui2/src/components/notifications_panel.rs index 3e0c3887c5..68fe6d4bd0 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, NotificationsPanel>(cx)) diff --git a/crates/ui2/src/components/palette.rs b/crates/ui2/src/components/palette.rs index 97f3df0b7c..a74c9e3672 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, Palette>(cx)) diff --git a/crates/ui2/src/components/panel.rs b/crates/ui2/src/components/panel.rs index 7da2dab09a..40129dbd76 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, Panel>(cx)) diff --git a/crates/ui2/src/components/project_panel.rs b/crates/ui2/src/components/project_panel.rs index 61458ad4a0..9f15102acc 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { 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.rs index 81da295c3a..cd7c22eecb 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, RecentProjects>(cx)) diff --git a/crates/ui2/src/components/tab.rs b/crates/ui2/src/components/tab.rs index 45c57ae484..6133906f27 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { 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.rs index 4c27d85f03..cffdc09026 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, TabBar>(cx)) diff --git a/crates/ui2/src/components/terminal.rs b/crates/ui2/src/components/terminal.rs index 4a38d20523..b7c8c5d75d 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { 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.rs index c1e1527d6c..b5fcd17d2f 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, ThemeSelector>(cx)) diff --git a/crates/ui2/src/components/toast.rs b/crates/ui2/src/components/toast.rs index 626a79b367..dca6f7c28a 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, Toast>(cx)) diff --git a/crates/ui2/src/components/toolbar.rs b/crates/ui2/src/components/toolbar.rs index b9da93b55d..a833090c1c 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { let theme = theme(cx); diff --git a/crates/ui2/src/components/traffic_lights.rs b/crates/ui2/src/components/traffic_lights.rs index f9bba2828a..320e7e68fd 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, TrafficLights>(cx)) diff --git a/crates/ui2/src/elements/avatar.rs b/crates/ui2/src/elements/avatar.rs index 3d540ec9ee..87133209a2 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, Avatar>(cx)) diff --git a/crates/ui2/src/elements/button.rs b/crates/ui2/src/elements/button.rs index b54944b45b..15d65dc5d2 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { let states = InteractionState::iter(); diff --git a/crates/ui2/src/elements/details.rs b/crates/ui2/src/elements/details.rs index 2ff8767066..f89cfb53db 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, Details>(cx)) diff --git a/crates/ui2/src/elements/icon.rs b/crates/ui2/src/elements/icon.rs index 7816086a78..b47e4c6608 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { let icons = Icon::iter(); diff --git a/crates/ui2/src/elements/input.rs b/crates/ui2/src/elements/input.rs index 557a8c5f83..79a09e0ba2 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, Input>(cx)) diff --git a/crates/ui2/src/elements/label.rs b/crates/ui2/src/elements/label.rs index 87076441ae..f4014d5922 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(self, _view: &mut V, cx: &mut ViewContext) -> impl Component { Story::container(cx) .child(Story::title_for::<_, Label>(cx))