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

@@ -1,6 +1,10 @@
use ticket_fields::{TicketDescription, TicketTitle};
// TODO: Provide an `iter` method that returns an iterator over `&Ticket` items.
//
// Hint: just like in the previous exercise, 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 `iter`.
#[derive(Clone)]
pub struct TicketStore {
tickets: Vec<Ticket>,