Code at the speed of thought – Zed is a high-performance, multiplayer code editor from the creators of Atom and Tree-sitter.
Add missing `Clone` bounds
Marshall Bowers2189983323ba
diff --git a/crates/ui2/src/components/buffer_search.rs b/crates/ui2/src/components/buffer_search.rsindex 7e863b84934..06acd468cd9 100644--- a/crates/ui2/src/components/buffer_search.rs+++ b/crates/ui2/src/components/buffer_search.rs@@ -3,6 +3,7 @@ use gpui3::{view, Context, View};use crate::prelude::*;use crate::{h_stack, Icon, IconButton, IconColor, Input};+#[derive(Clone)]pub struct BufferSearch {is_replace_open: bool,}diff --git a/crates/ui2/src/elements/input.rs b/crates/ui2/src/elements/input.rsindex df126c52cf2..c5076cfab93 100644--- a/crates/ui2/src/elements/input.rs+++ b/crates/ui2/src/elements/input.rs@@ -12,7 +12,7 @@ pub enum InputVariant {}#[derive(Element)]-pub struct Input<S: 'static + Send + Sync> {+pub struct Input<S: 'static + Send + Sync + Clone> {state_type: PhantomData<S>,placeholder: SharedString,value: String,@@ -22,7 +22,7 @@ pub struct Input<S: 'static + Send + Sync> {is_active: bool,}-impl<S: 'static + Send + Sync> Input<S> {+impl<S: 'static + Send + Sync + Clone> Input<S> {pub fn new(placeholder: impl Into<SharedString>) -> Self {Self {state_type: PhantomData,@@ -77,7 +77,7 @@ impl<S: 'static + Send + Sync> Input<S> {),};- let placeholder_label = Label::new(self.placeholder).color(if self.disabled {+ let placeholder_label = Label::new(self.placeholder.clone()).color(if self.disabled {LabelColor::Disabled} else {LabelColor::Placeholder