Merge pull request #141 from abd0-omar/patch-1

Fix remove redundant clone
This commit is contained in:
Henk Oordt 2024-09-06 16:37:16 +02:00 committed by GitHub
commit c6f457a772
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}"),