From fa3916d1bf8b3603fde75779d07cdd33977f5a16 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Thu, 19 Oct 2023 16:34:08 -0400 Subject: [PATCH] Remove `Clone` bound for `HighlightedLabel` --- crates/ui2/src/elements/input.rs | 4 ++-- crates/ui2/src/elements/label.rs | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/crates/ui2/src/elements/input.rs b/crates/ui2/src/elements/input.rs index 33647e234f71ba2e4f32e41919032b69fbe4c3fd..dc2a8b8d6346623cc295e1c8004c5a76ade0a066 100644 --- a/crates/ui2/src/elements/input.rs +++ b/crates/ui2/src/elements/input.rs @@ -122,11 +122,11 @@ mod stories { use super::*; #[derive(Element)] - pub struct InputStory { + pub struct InputStory { state_type: PhantomData, } - impl InputStory { + impl InputStory { pub fn new() -> Self { Self { state_type: PhantomData, diff --git a/crates/ui2/src/elements/label.rs b/crates/ui2/src/elements/label.rs index cee964df12a2a8c5a0172f223a3b0296c08ede4f..5278404d2bf3989ade60d9b0e3b543b5b6efd756 100644 --- a/crates/ui2/src/elements/label.rs +++ b/crates/ui2/src/elements/label.rs @@ -107,8 +107,8 @@ impl Label { } } -#[derive(Element, Clone)] -pub struct HighlightedLabel { +#[derive(Element)] +pub struct HighlightedLabel { state_type: PhantomData, label: SharedString, color: LabelColor, @@ -116,7 +116,7 @@ pub struct HighlightedLabel { strikethrough: bool, } -impl HighlightedLabel { +impl HighlightedLabel { pub fn new(label: impl Into, highlight_indices: Vec) -> Self { Self { state_type: PhantomData, @@ -214,11 +214,11 @@ mod stories { use super::*; #[derive(Element)] - pub struct LabelStory { + pub struct LabelStory { state_type: PhantomData, } - impl LabelStory { + impl LabelStory { pub fn new() -> Self { Self { state_type: PhantomData,