Add missing Clone bounds
This commit is contained in:
@@ -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,
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user