mirror of
https://github.com/mainmatter/100-exercises-to-learn-rust
synced 2024-11-16 19:50:44 +01:00
Fix remove redundant clone
This commit is contained in:
parent
b9462c8159
commit
568d0db8fb
1 changed files with 1 additions and 1 deletions
|
@ -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}"),
|
||||
|
|
Loading…
Reference in a new issue