Give a more structure hint for iteration exercises (#235)

This commit is contained in:
Luca Palmieri
2024-12-18 17:03:24 +01:00
committed by GitHub
parent 60947aaacd
commit d5e1c00108
2 changed files with 7 additions and 0 deletions

View File

@@ -5,6 +5,9 @@ use ticket_fields::{TicketDescription, TicketTitle};
// it contains using a `for` loop.
//
// Hint: you shouldn't have to implement the `Iterator` trait in this case.
// You want to *delegate* the iteration to the `Vec<Ticket>` field in `TicketStore`.
// Look at the standard library documentation for `Vec` to find the right type
// to return from `into_iter`.
#[derive(Clone)]
pub struct TicketStore {
tickets: Vec<Ticket>,