Fix remove redundant clone

This commit is contained in:
Abdelrahman Omar 2024-09-06 15:19:52 +03:00 committed by GitHub
parent b9462c8159
commit 568d0db8fb
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -25,7 +25,7 @@ impl std::error::Error for 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(err) => match err {
TicketNewError::TitleError(_) => panic!("{err}"),