Add missing Clone
bounds
This commit is contained in:
parent
58650b7d2d
commit
2189983323
2 changed files with 4 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue