Give a more structure hint for iteration exercises (#235)
This commit is contained in:
@@ -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>,
|
||||
|
||||
Reference in New Issue
Block a user