From 912c30c05bd727001f5702dbea85fc3fe6fc7694 Mon Sep 17 00:00:00 2001 From: Marshall Bowers Date: Wed, 29 Nov 2023 12:35:39 -0500 Subject: [PATCH] Remove unneeded `.clone`s --- crates/ui2/src/components/list.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/ui2/src/components/list.rs b/crates/ui2/src/components/list.rs index f6aa0e08b7a226d7cbae07c791757e2403e6e322..fbb42b2b4e3be0e30b666b790c7e6a22baa3b4d7 100644 --- a/crates/ui2/src/components/list.rs +++ b/crates/ui2/src/components/list.rs @@ -279,7 +279,7 @@ impl RenderOnce for ListItem { .when(self.selected, |this| { 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| { // HACK: GPUI currently fires `on_click` with any mouse button, // but we only care about the left button. @@ -302,7 +302,7 @@ impl RenderOnce for ListItem { .items_center() .relative() .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( IconElement::new(i) .size(IconSize::Small)