From 72197802a2ed966fa6619abff0c82d6f663166da Mon Sep 17 00:00:00 2001 From: Joseph Lyons Date: Fri, 24 Feb 2023 08:53:58 -0500 Subject: [PATCH] Tweak code to remove duplication --- crates/feedback/src/feedback_info_text.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/feedback/src/feedback_info_text.rs b/crates/feedback/src/feedback_info_text.rs index 0ba5ef49f7..8c31050109 100644 --- a/crates/feedback/src/feedback_info_text.rs +++ b/crates/feedback/src/feedback_info_text.rs @@ -44,13 +44,13 @@ impl View for FeedbackInfoText { ) .with_child( MouseEventHandler::::new(0, cx, |state, _| { - let text = if state.hovered() { - theme.feedback.link_text_hover.clone() + let contained_text = if state.hovered() { + &theme.feedback.link_text_hover } else { - theme.feedback.link_text_default.clone() + &theme.feedback.link_text_default }; - Label::new("community repo", text.text) + Label::new("community repo", contained_text.text.clone()) .contained() .aligned() .left()