diff --git a/exercises/06_ticket_management/04_iterators/src/lib.rs b/exercises/06_ticket_management/04_iterators/src/lib.rs index d55906ca9..e7eb9f912 100644 --- a/exercises/06_ticket_management/04_iterators/src/lib.rs +++ b/exercises/06_ticket_management/04_iterators/src/lib.rs @@ -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` 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, diff --git a/exercises/06_ticket_management/05_iter/src/lib.rs b/exercises/06_ticket_management/05_iter/src/lib.rs index da75366ad..71d3e51c6 100644 --- a/exercises/06_ticket_management/05_iter/src/lib.rs +++ b/exercises/06_ticket_management/05_iter/src/lib.rs @@ -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` 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,