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
28d39cb0f4
commit
b9462c8159
1 changed files with 1 additions and 1 deletions
|
@ -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()
|
||||
|
|
Loading…
Reference in a new issue