File tree Expand file tree Collapse file tree 2 files changed +7
-0
lines changed
exercises/06_ticket_management Expand file tree Collapse file tree 2 files changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,9 @@ use ticket_fields::{TicketDescription, TicketTitle};
55// it contains using a `for` loop.
66//
77// Hint: you shouldn't have to implement the `Iterator` trait in this case.
8+ // You want to *delegate* the iteration to the `Vec<Ticket>` field in `TicketStore`.
9+ // Look at the standard library documentation for `Vec` to find the right type
10+ // to return from `into_iter`.
811#[ derive( Clone ) ]
912pub struct TicketStore {
1013 tickets : Vec < Ticket > ,
Original file line number Diff line number Diff line change 11use ticket_fields:: { TicketDescription , TicketTitle } ;
22
33// TODO: Provide an `iter` method that returns an iterator over `&Ticket` items.
4+ //
5+ // Hint: just like in the previous exercise, you want to delegate the iteration to
6+ // the `Vec<Ticket>` field in `TicketStore`. Look at the standard library documentation
7+ // for `Vec` to find the right type to return from `iter`.
48#[ derive( Clone ) ]
59pub struct TicketStore {
610 tickets : Vec < Ticket > ,
You can’t perform that action at this time.
0 commit comments