From c5311052d7ff2bbd0882693872c26b28c48dff84 Mon Sep 17 00:00:00 2001 From: MrExplode Date: Thu, 2 Nov 2023 19:19:57 +0100 Subject: [PATCH] fix: me vs borrow checker 0 - 1 --- src/jira.rs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/jira.rs b/src/jira.rs index c1c99dd..bfc7902 100644 --- a/src/jira.rs +++ b/src/jira.rs @@ -139,8 +139,12 @@ fn decorate_issue_embed(e: &mut Embed, data: &JiraData, project_url: String, iss for item in &data.changelog.items { e.field(&item.field, "", false) - .field("From", &item.from_string.unwrap_or("(unknown)".to_string()), true) - .field("To", &item.to_string.unwrap_or("(unknown)".to_string()), true); + .field( + "From", + item.from_string.as_ref().unwrap_or(&"(unknown)".to_string()), + true, + ) + .field("To", item.to_string.as_ref().unwrap_or(&"(unknown)".to_string()), true); } } "jira:issue_deleted" => {