Remove Clone
bound from Button
and Details
This commit is contained in:
parent
fa3916d1bf
commit
a1aba32209
2 changed files with 5 additions and 5 deletions
|
@ -34,7 +34,7 @@ impl<S: 'static + Send + Sync> Default for ButtonHandlers<S> {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Element)]
|
#[derive(Element)]
|
||||||
pub struct Button<S: 'static + Send + Sync + Clone> {
|
pub struct Button<S: 'static + Send + Sync> {
|
||||||
state_type: PhantomData<S>,
|
state_type: PhantomData<S>,
|
||||||
label: SharedString,
|
label: SharedString,
|
||||||
variant: ButtonVariant,
|
variant: ButtonVariant,
|
||||||
|
@ -45,7 +45,7 @@ pub struct Button<S: 'static + Send + Sync + Clone> {
|
||||||
handlers: ButtonHandlers<S>,
|
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 {
|
pub fn new(label: impl Into<SharedString>) -> Self {
|
||||||
Self {
|
Self {
|
||||||
state_type: PhantomData,
|
state_type: PhantomData,
|
||||||
|
|
|
@ -2,14 +2,14 @@ use std::marker::PhantomData;
|
||||||
|
|
||||||
use crate::prelude::*;
|
use crate::prelude::*;
|
||||||
|
|
||||||
#[derive(Element, Clone)]
|
#[derive(Element)]
|
||||||
pub struct Details<S: 'static + Send + Sync + Clone> {
|
pub struct Details<S: 'static + Send + Sync> {
|
||||||
state_type: PhantomData<S>,
|
state_type: PhantomData<S>,
|
||||||
text: &'static str,
|
text: &'static str,
|
||||||
meta: Option<&'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 {
|
pub fn new(text: &'static str) -> Self {
|
||||||
Self {
|
Self {
|
||||||
state_type: PhantomData,
|
state_type: PhantomData,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue