diff --git a/crates/ui2/src/components/assistant_panel.rs b/crates/ui2/src/components/assistant_panel.rs index adf786e09a..2b32f332a4 100644 --- a/crates/ui2/src/components/assistant_panel.rs +++ b/crates/ui2/src/components/assistant_panel.rs @@ -6,13 +6,13 @@ use crate::prelude::*; use crate::{Icon, IconButton, Label, Panel, PanelSide}; #[derive(Element)] -pub struct AssistantPanel { +pub struct AssistantPanel { id: ElementId, state_type: PhantomData, current_side: PanelSide, } -impl AssistantPanel { +impl AssistantPanel { pub fn new(id: impl Into) -> Self { Self { id: id.into(), @@ -87,11 +87,11 @@ mod stories { use super::*; #[derive(Element)] - pub struct AssistantPanelStory { + pub struct AssistantPanelStory { state_type: PhantomData, } - impl AssistantPanelStory { + impl AssistantPanelStory { pub fn new() -> Self { Self { state_type: PhantomData, diff --git a/crates/ui2/src/components/breadcrumb.rs b/crates/ui2/src/components/breadcrumb.rs index d0286f325d..23dc824006 100644 --- a/crates/ui2/src/components/breadcrumb.rs +++ b/crates/ui2/src/components/breadcrumb.rs @@ -10,13 +10,13 @@ use crate::{h_stack, HighlightedText}; pub struct Symbol(pub Vec); #[derive(Element)] -pub struct Breadcrumb { +pub struct Breadcrumb { state_type: PhantomData, path: PathBuf, symbols: Vec, } -impl Breadcrumb { +impl Breadcrumb { pub fn new(path: PathBuf, symbols: Vec) -> Self { Self { state_type: PhantomData, @@ -91,11 +91,11 @@ mod stories { use super::*; #[derive(Element)] - pub struct BreadcrumbStory { + pub struct BreadcrumbStory { state_type: PhantomData, } - impl BreadcrumbStory { + impl BreadcrumbStory { pub fn new() -> Self { Self { state_type: PhantomData, diff --git a/crates/ui2/src/components/chat_panel.rs b/crates/ui2/src/components/chat_panel.rs index 6eb534abe9..e8f535bda9 100644 --- a/crates/ui2/src/components/chat_panel.rs +++ b/crates/ui2/src/components/chat_panel.rs @@ -118,11 +118,11 @@ mod stories { use super::*; #[derive(Element)] - pub struct ChatPanelStory { + pub struct ChatPanelStory { state_type: PhantomData, } - impl ChatPanelStory { + impl ChatPanelStory { pub fn new() -> Self { Self { state_type: PhantomData, diff --git a/crates/ui2/src/components/collab_panel.rs b/crates/ui2/src/components/collab_panel.rs index b5aff7926c..b88697656d 100644 --- a/crates/ui2/src/components/collab_panel.rs +++ b/crates/ui2/src/components/collab_panel.rs @@ -7,12 +7,12 @@ use gpui3::{img, svg, SharedString}; use std::marker::PhantomData; #[derive(Element)] -pub struct CollabPanel { +pub struct CollabPanel { id: ElementId, state_type: PhantomData, } -impl CollabPanel { +impl CollabPanel { pub fn new(id: impl Into) -> Self { Self { id: id.into(), @@ -165,11 +165,11 @@ mod stories { use super::*; #[derive(Element)] - pub struct CollabPanelStory { + pub struct CollabPanelStory { state_type: PhantomData, } - impl CollabPanelStory { + impl CollabPanelStory { pub fn new() -> Self { Self { state_type: PhantomData, diff --git a/crates/ui2/src/components/command_palette.rs b/crates/ui2/src/components/command_palette.rs index 11d80fdc86..45194e843c 100644 --- a/crates/ui2/src/components/command_palette.rs +++ b/crates/ui2/src/components/command_palette.rs @@ -4,12 +4,12 @@ use crate::prelude::*; use crate::{example_editor_actions, OrderMethod, Palette}; #[derive(Element)] -pub struct CommandPalette { +pub struct CommandPalette { id: ElementId, state_type: PhantomData, } -impl CommandPalette { +impl CommandPalette { pub fn new(id: impl Into) -> Self { Self { id: id.into(), @@ -38,11 +38,11 @@ mod stories { use super::*; #[derive(Element)] - pub struct CommandPaletteStory { + pub struct CommandPaletteStory { state_type: PhantomData, } - impl CommandPaletteStory { + impl CommandPaletteStory { pub fn new() -> Self { Self { state_type: PhantomData, diff --git a/crates/ui2/src/components/context_menu.rs b/crates/ui2/src/components/context_menu.rs index 5096f37c6d..aa07f9a580 100644 --- a/crates/ui2/src/components/context_menu.rs +++ b/crates/ui2/src/components/context_menu.rs @@ -74,11 +74,11 @@ mod stories { use super::*; #[derive(Element)] - pub struct ContextMenuStory { + pub struct ContextMenuStory { state_type: PhantomData, } - impl ContextMenuStory { + impl ContextMenuStory { pub fn new() -> Self { Self { state_type: PhantomData, diff --git a/crates/ui2/src/components/notifications_panel.rs b/crates/ui2/src/components/notifications_panel.rs index f60bfb4585..467928ff43 100644 --- a/crates/ui2/src/components/notifications_panel.rs +++ b/crates/ui2/src/components/notifications_panel.rs @@ -4,12 +4,12 @@ use crate::{prelude::*, static_new_notification_items, static_read_notification_ use crate::{List, ListHeader}; #[derive(Element)] -pub struct NotificationsPanel { +pub struct NotificationsPanel { id: ElementId, state_type: PhantomData, } -impl NotificationsPanel { +impl NotificationsPanel { pub fn new(id: impl Into) -> Self { Self { id: id.into(), diff --git a/crates/ui2/src/components/project_panel.rs b/crates/ui2/src/components/project_panel.rs index d1b89f9b4c..29008ea30f 100644 --- a/crates/ui2/src/components/project_panel.rs +++ b/crates/ui2/src/components/project_panel.rs @@ -6,12 +6,12 @@ use crate::{ }; #[derive(Element)] -pub struct ProjectPanel { +pub struct ProjectPanel { id: ElementId, state_type: PhantomData, } -impl ProjectPanel { +impl ProjectPanel { pub fn new(id: impl Into) -> Self { Self { id: id.into(), diff --git a/crates/ui2/src/components/theme_selector.rs b/crates/ui2/src/components/theme_selector.rs index 99a0119fac..3186e814bd 100644 --- a/crates/ui2/src/components/theme_selector.rs +++ b/crates/ui2/src/components/theme_selector.rs @@ -4,12 +4,12 @@ use crate::prelude::*; use crate::{OrderMethod, Palette, PaletteItem}; #[derive(Element)] -pub struct ThemeSelector { +pub struct ThemeSelector { id: ElementId, state_type: PhantomData, } -impl ThemeSelector { +impl ThemeSelector { pub fn new(id: impl Into) -> Self { Self { id: id.into(), diff --git a/crates/ui2/src/components/toast.rs b/crates/ui2/src/components/toast.rs index 1f19dc911e..66bd40f423 100644 --- a/crates/ui2/src/components/toast.rs +++ b/crates/ui2/src/components/toast.rs @@ -79,11 +79,11 @@ mod stories { use super::*; #[derive(Element)] - pub struct ToastStory { + pub struct ToastStory { state_type: PhantomData, } - impl ToastStory { + impl ToastStory { pub fn new() -> Self { Self { state_type: PhantomData, diff --git a/crates/ui2/src/static_data.rs b/crates/ui2/src/static_data.rs index d62fed09a0..06473fbfa4 100644 --- a/crates/ui2/src/static_data.rs +++ b/crates/ui2/src/static_data.rs @@ -324,7 +324,7 @@ pub fn static_players_with_call_status() -> Vec { ] } -pub fn static_new_notification_items() -> Vec> { +pub fn static_new_notification_items() -> Vec> { vec![ ListDetailsEntry::new("maxdeviant invited you to join a stream in #design.") .meta("4 people in stream."), @@ -335,7 +335,7 @@ pub fn static_new_notification_items() -> Vec< .collect() } -pub fn static_read_notification_items() -> Vec> { +pub fn static_read_notification_items() -> Vec> { vec![ ListDetailsEntry::new("mikaylamaki added you as a contact.").actions(vec![ Button::new("Decline"), @@ -351,7 +351,7 @@ pub fn static_read_notification_items() -> Vec .collect() } -pub fn static_project_panel_project_items() -> Vec> { +pub fn static_project_panel_project_items() -> Vec> { vec![ ListEntry::new(Label::new("zed")) .set_left_icon(Icon::FolderOpen.into()) @@ -478,7 +478,7 @@ pub fn static_project_panel_project_items() -> .collect() } -pub fn static_project_panel_single_items() -> Vec> { +pub fn static_project_panel_single_items() -> Vec> { vec![ ListEntry::new(Label::new("todo.md")) .set_left_icon(Icon::FileDoc.into()) @@ -495,7 +495,7 @@ pub fn static_project_panel_single_items() -> .collect() } -pub fn static_collab_panel_current_call() -> Vec> { +pub fn static_collab_panel_current_call() -> Vec> { vec![ ListEntry::new(Label::new("as-cii")).set_left_avatar("http://github.com/as-cii.png?s=50"), ListEntry::new(Label::new("nathansobo")) @@ -508,7 +508,7 @@ pub fn static_collab_panel_current_call() -> V .collect() } -pub fn static_collab_panel_channels() -> Vec> { +pub fn static_collab_panel_channels() -> Vec> { vec![ ListEntry::new(Label::new("zed")) .set_left_icon(Icon::Hash.into()) @@ -572,7 +572,7 @@ pub fn static_collab_panel_channels() -> Vec() -> Vec> { +pub fn example_editor_actions() -> Vec> { vec![ PaletteItem::new("New File").keybinding(Keybinding::new( "N".to_string(),