Add missing Clone bounds

This commit is contained in:
Marshall Bowers committed 2023-10-19 15:02:00 -04:00
1 parent 05a572d82c
commit 9d3f26cb2a
2 files changed
+4 -3

No files matched your search

@@ -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,
}
+3 -3
View File
@@ -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