mirror of
https://github.com/zed-industries/zed.git
synced 2025-01-30 22:34:13 +00:00
Remove unneeded .clone
s
This commit is contained in:
parent
97e6fd295a
commit
912c30c05b
1 changed files with 2 additions and 2 deletions
|
@ -279,7 +279,7 @@ impl RenderOnce for ListItem {
|
||||||
.when(self.selected, |this| {
|
.when(self.selected, |this| {
|
||||||
this.bg(cx.theme().colors().ghost_element_selected)
|
this.bg(cx.theme().colors().ghost_element_selected)
|
||||||
})
|
})
|
||||||
.when_some(self.on_click.clone(), |this, on_click| {
|
.when_some(self.on_click, |this, on_click| {
|
||||||
this.cursor_pointer().on_click(move |event, cx| {
|
this.cursor_pointer().on_click(move |event, cx| {
|
||||||
// HACK: GPUI currently fires `on_click` with any mouse button,
|
// HACK: GPUI currently fires `on_click` with any mouse button,
|
||||||
// but we only care about the left button.
|
// but we only care about the left button.
|
||||||
|
@ -302,7 +302,7 @@ impl RenderOnce for ListItem {
|
||||||
.items_center()
|
.items_center()
|
||||||
.relative()
|
.relative()
|
||||||
.child(disclosure_control(self.toggle, self.on_toggle))
|
.child(disclosure_control(self.toggle, self.on_toggle))
|
||||||
.map(|this| match self.left_slot.clone() {
|
.map(|this| match self.left_slot {
|
||||||
Some(GraphicSlot::Icon(i)) => this.child(
|
Some(GraphicSlot::Icon(i)) => this.child(
|
||||||
IconElement::new(i)
|
IconElement::new(i)
|
||||||
.size(IconSize::Small)
|
.size(IconSize::Small)
|
||||||
|
|
Loading…
Reference in a new issue