From 549e78d7b3ade6e540f15c56934c5df9ff83e66b Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Wed, 18 Oct 2023 14:28:28 -0400 Subject: [PATCH] Use `SharedString` for `Input`s --- crates/ui2/src/elements/input.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/crates/ui2/src/elements/input.rs b/crates/ui2/src/elements/input.rs index 0323de7032..45edb1a73d 100644 --- a/crates/ui2/src/elements/input.rs +++ b/crates/ui2/src/elements/input.rs @@ -13,17 +13,17 @@ pub enum InputVariant { #[derive(Element)] pub struct Input { state_type: PhantomData, - placeholder: &'static str, + placeholder: SharedString, value: String, state: InteractionState, variant: InputVariant, } impl Input { - pub fn new(placeholder: &'static str) -> Self { + pub fn new(placeholder: impl Into) -> Self { Self { state_type: PhantomData, - placeholder, + placeholder: placeholder.into(), value: "".to_string(), state: InteractionState::default(), variant: InputVariant::default(),