Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Remove `Clone` bound from `Button` and `Details`
Marshall Bowersa1aba3220971
diff --git a/crates/ui2/src/elements/button.rs b/crates/ui2/src/elements/button.rsindex 7d7040e1815..b0fe2d71d7c 100644--- a/crates/ui2/src/elements/button.rs+++ b/crates/ui2/src/elements/button.rs@@ -34,7 +34,7 @@ impl<S: 'static + Send + Sync> Default for ButtonHandlers<S> {}#[derive(Element)]-pub struct Button<S: 'static + Send + Sync + Clone> {+pub struct Button<S: 'static + Send + Sync> {state_type: PhantomData<S>,label: SharedString,variant: ButtonVariant,@@ -45,7 +45,7 @@ pub struct Button<S: 'static + Send + Sync + Clone> {handlers: ButtonHandlers<S>,}-impl<S: 'static + Send + Sync + Clone> Button<S> {+impl<S: 'static + Send + Sync> Button<S> {pub fn new(label: impl Into<SharedString>) -> Self {Self {state_type: PhantomData,diff --git a/crates/ui2/src/elements/details.rs b/crates/ui2/src/elements/details.rsindex 1467376c00c..30aa696c3ba 100644--- a/crates/ui2/src/elements/details.rs+++ b/crates/ui2/src/elements/details.rs@@ -2,14 +2,14 @@ use std::marker::PhantomData;use crate::prelude::*;-#[derive(Element, Clone)]-pub struct Details<S: 'static + Send + Sync + Clone> {+#[derive(Element)]+pub struct Details<S: 'static + Send + Sync> {state_type: PhantomData<S>,text: &'static str,meta: Option<&'static str>,}-impl<S: 'static + Send + Sync + Clone> Details<S> {+impl<S: 'static + Send + Sync> Details<S> {pub fn new(text: &'static str) -> Self {Self {state_type: PhantomData,