Use &str rather than &String.
authorLukeMathWalker <20745048+LukeMathWalker@users.noreply.github.com>
Tue, 14 May 2024 12:53:55 +0000 (14:53 +0200)
committerLukeMathWalker <20745048+LukeMathWalker@users.noreply.github.com>
Tue, 14 May 2024 12:53:55 +0000 (14:53 +0200)
exercises/05_ticket_v2/03_variants_with_data/src/lib.rs

index f60af71..c3943fe 100644 (file)
@@ -37,7 +37,7 @@ impl Ticket {
             status,
         }
     }
-    pub fn assigned_to(&self) -> &String {
+    pub fn assigned_to(&self) -> &str {
         todo!()
     }
 }