From b9462c8159e6094bc4e6a718ef41d1d208de679f Mon Sep 17 00:00:00 2001 From: Abdelrahman Omar <128975938+abd0-omar@users.noreply.github.com> Date: Fri, 6 Sep 2024 15:06:53 +0300 Subject: [PATCH] Fix remove redundant clone --- exercises/05_ticket_v2/08_error_enums/src/lib.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/exercises/05_ticket_v2/08_error_enums/src/lib.rs b/exercises/05_ticket_v2/08_error_enums/src/lib.rs index 9262c9b..2f77d96 100644 --- a/exercises/05_ticket_v2/08_error_enums/src/lib.rs +++ b/exercises/05_ticket_v2/08_error_enums/src/lib.rs @@ -12,7 +12,7 @@ enum TicketNewError { // When the description is invalid, instead, it should use a default description: // "Description not provided". fn easy_ticket(title: String, description: String, status: Status) -> Ticket { - match Ticket::new(title.clone(), description.clone(), status.clone()) { + match Ticket::new(title.clone(), description, status.clone()) { Ok(ticket) => ticket, Err(TicketNewError::DescriptionError(_)) => { Ticket::new(title, "Description not provided".to_string(), status).unwrap()