diff --git a/crates/core/src/combobox.rs b/crates/core/src/combobox.rs index dbdf2de..22e3d10 100644 --- a/crates/core/src/combobox.rs +++ b/crates/core/src/combobox.rs @@ -8,7 +8,7 @@ use std::cell::RefCell; use std::rc::Rc; -use gpui::prelude::FluentBuilder as _; +use gpui::prelude::FluentBuilder; use gpui::{ App, Bounds, Context, ElementId, Entity, InteractiveElement as _, IntoElement, KeyBinding, MouseButton, MouseDownEvent, ParentElement as _, Pixels, Render, Role, ScrollHandle, @@ -183,6 +183,9 @@ where } } +// Combobox is a data builder, not an element, adopt the combinators explicitly. +impl FluentBuilder for Combobox where T: Clone + PartialEq + 'static {} + /// The stateful combobox. pub struct ComboboxState where diff --git a/crates/core/src/command_palette.rs b/crates/core/src/command_palette.rs index 737ebdd..267c599 100644 --- a/crates/core/src/command_palette.rs +++ b/crates/core/src/command_palette.rs @@ -2,7 +2,7 @@ use std::rc::Rc; -use gpui::prelude::FluentBuilder as _; +use gpui::prelude::FluentBuilder; use gpui::{ AnyElement, App, Context, ElementId, Entity, InteractiveElement as _, IntoElement, KeyBinding, MouseButton, ParentElement as _, Render, Role, ScrollHandle, SharedString, @@ -87,6 +87,9 @@ impl Command { } } +// Command is a data builder, not an element, adopt the combinators explicitly. +impl FluentBuilder for Command {} + /// Filters and ranks the commands for a query. pub type CommandMatcher = Rc Vec>; /// Runs the chosen command. @@ -148,6 +151,9 @@ impl CommandPalette { } } +// CommandPalette is a data builder, not an element, adopt the combinators explicitly. +impl FluentBuilder for CommandPalette {} + /// The stateful palette. pub struct CommandPaletteState { id: ElementId, diff --git a/crates/core/src/radio.rs b/crates/core/src/radio.rs index 8c072d1..1c4137a 100644 --- a/crates/core/src/radio.rs +++ b/crates/core/src/radio.rs @@ -1,4 +1,4 @@ -use gpui::prelude::FluentBuilder as _; +use gpui::prelude::FluentBuilder; use gpui::{ App, ElementId, InteractiveElement as _, IntoElement, ParentElement as _, RenderOnce, Role, SharedString, StatefulInteractiveElement as _, Styled as _, Toggled, Window, div, @@ -67,6 +67,9 @@ where } } +// Radio is a data builder, not an element, adopt the combinators explicitly. +impl FluentBuilder for Radio {} + /// Group of radio buttons. #[derive(IntoElement)] #[must_use] diff --git a/crates/core/src/segmented.rs b/crates/core/src/segmented.rs index a6d2937..e5f90f7 100644 --- a/crates/core/src/segmented.rs +++ b/crates/core/src/segmented.rs @@ -1,6 +1,6 @@ use std::rc::Rc; -use gpui::prelude::FluentBuilder as _; +use gpui::prelude::FluentBuilder; use gpui::{ AnimationExt as _, App, Bounds, ElementId, Entity, InteractiveElement as _, IntoElement, KeyDownEvent, ParentElement as _, Point, RenderOnce, Role, SharedString, SpringAnimation, @@ -60,6 +60,9 @@ where } } +// SegmentedOption is a data builder, not an element, adopt the combinators explicitly. +impl FluentBuilder for SegmentedOption {} + /// A pill strip of mutually exclusive choices. #[derive(IntoElement)] #[must_use] diff --git a/crates/core/src/select.rs b/crates/core/src/select.rs index ece616e..979cea8 100644 --- a/crates/core/src/select.rs +++ b/crates/core/src/select.rs @@ -1,6 +1,6 @@ use std::rc::Rc; -use gpui::prelude::FluentBuilder as _; +use gpui::prelude::FluentBuilder; use gpui::{ App, ElementId, InteractiveElement as _, IntoElement, KeyDownEvent, ParentElement as _, RenderOnce, Role, SharedString, StatefulInteractiveElement as _, StyleRefinement, Styled as _, @@ -61,6 +61,9 @@ where } } +// SelectOption is a data builder, not an element, adopt the combinators explicitly. +impl FluentBuilder for SelectOption {} + /// A control that shows the chosen value and opens a menu of the choices. #[derive(IntoElement)] #[must_use] diff --git a/crates/core/src/toast.rs b/crates/core/src/toast.rs index e4b4c0a..ff998cd 100644 --- a/crates/core/src/toast.rs +++ b/crates/core/src/toast.rs @@ -3,7 +3,7 @@ use std::rc::Rc; use std::time::Duration; -use gpui::prelude::FluentBuilder as _; +use gpui::prelude::FluentBuilder; use gpui::{ Animation, AnimationExt as _, App, Context, ElementId, Entity, InteractiveElement as _, IntoElement, ParentElement as _, RenderOnce, Role, SharedString, @@ -100,6 +100,9 @@ impl Toast { } } +// Toast is a data builder, not an element, adopt the combinators explicitly. +impl FluentBuilder for Toast {} + /// One raised toast, with its identity in the store. #[derive(Clone)] pub struct ToastEntry { diff --git a/crates/data/src/list.rs b/crates/data/src/list.rs index 553bb18..f91b708 100644 --- a/crates/data/src/list.rs +++ b/crates/data/src/list.rs @@ -1,6 +1,6 @@ use std::rc::Rc; -use gpui::prelude::FluentBuilder as _; +use gpui::prelude::FluentBuilder; use gpui::{ AnyElement, App, ElementId, FocusHandle, InteractiveElement as _, IntoElement, KeyDownEvent, ParentElement as _, RenderOnce, Role, SharedString, StatefulInteractiveElement as _, @@ -65,6 +65,9 @@ impl ListItem { } } +// ListItem is a data builder, not an element, adopt the combinators explicitly. +impl FluentBuilder for ListItem {} + /// A single-selection list. #[derive(IntoElement)] #[must_use] diff --git a/crates/data/src/sidebar.rs b/crates/data/src/sidebar.rs index 2f7182d..86abcc5 100644 --- a/crates/data/src/sidebar.rs +++ b/crates/data/src/sidebar.rs @@ -5,7 +5,7 @@ use std::rc::Rc; -use gpui::prelude::FluentBuilder as _; +use gpui::prelude::FluentBuilder; use gpui::{ AnyElement, App, ElementId, FocusHandle, InteractiveElement as _, IntoElement, KeyDownEvent, ParentElement as _, RenderOnce, Role, SharedString, StatefulInteractiveElement as _, @@ -120,6 +120,9 @@ impl SidebarEntry { } } +// SidebarEntry is a data builder, not an element, adopt the combinators explicitly. +impl FluentBuilder for SidebarEntry {} + /// A sidebar. #[derive(IntoElement)] #[must_use] diff --git a/crates/data/src/tree.rs b/crates/data/src/tree.rs index 7a67a12..ca67467 100644 --- a/crates/data/src/tree.rs +++ b/crates/data/src/tree.rs @@ -1,6 +1,6 @@ use std::rc::Rc; -use gpui::prelude::FluentBuilder as _; +use gpui::prelude::FluentBuilder; use gpui::{ AnyElement, App, ElementId, FocusHandle, InteractiveElement as _, IntoElement, KeyDownEvent, ParentElement as _, RenderOnce, Role, SharedString, StatefulInteractiveElement as _, @@ -81,6 +81,9 @@ impl TreeItem { } } +// TreeItem is a data builder, not an element, adopt the combinators explicitly. +impl FluentBuilder for TreeItem {} + /// A tree. #[derive(IntoElement)] #[must_use]