Remove Clone
bound from IconElement
This commit is contained in:
parent
a1aba32209
commit
e1e8b63eb5
2 changed files with 4 additions and 4 deletions
|
@ -94,7 +94,7 @@ impl<S: 'static + Send + Sync + Clone> Tab<S> {
|
||||||
(GitStatus::Conflict, false) => Label::new(self.title.clone()),
|
(GitStatus::Conflict, false) => Label::new(self.title.clone()),
|
||||||
};
|
};
|
||||||
|
|
||||||
let close_icon = IconElement::new(Icon::Close).color(IconColor::Muted);
|
let close_icon = || IconElement::new(Icon::Close).color(IconColor::Muted);
|
||||||
|
|
||||||
let (tab_bg, tab_hover_bg, tab_active_bg) = match self.current {
|
let (tab_bg, tab_hover_bg, tab_active_bg) = match self.current {
|
||||||
true => (
|
true => (
|
||||||
|
@ -131,13 +131,13 @@ impl<S: 'static + Send + Sync + Clone> Tab<S> {
|
||||||
}))
|
}))
|
||||||
.children(self.icon.map(IconElement::new))
|
.children(self.icon.map(IconElement::new))
|
||||||
.children(if self.close_side == IconSide::Left {
|
.children(if self.close_side == IconSide::Left {
|
||||||
Some(close_icon.clone())
|
Some(close_icon())
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
})
|
})
|
||||||
.child(label)
|
.child(label)
|
||||||
.children(if self.close_side == IconSide::Right {
|
.children(if self.close_side == IconSide::Right {
|
||||||
Some(close_icon)
|
Some(close_icon())
|
||||||
} else {
|
} else {
|
||||||
None
|
None
|
||||||
}),
|
}),
|
||||||
|
|
|
@ -148,7 +148,7 @@ impl Icon {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(Element, Clone)]
|
#[derive(Element)]
|
||||||
pub struct IconElement<S: 'static + Send + Sync> {
|
pub struct IconElement<S: 'static + Send + Sync> {
|
||||||
state_type: PhantomData<S>,
|
state_type: PhantomData<S>,
|
||||||
icon: Icon,
|
icon: Icon,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue