File tree 2 files changed +7
-0
lines changed
exercises/06_ticket_management
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};
5
5
// it contains using a `for` loop.
6
6
//
7
7
// 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`.
8
11
#[ derive( Clone ) ]
9
12
pub struct TicketStore {
10
13
tickets : Vec < Ticket > ,
Original file line number Diff line number Diff line change 1
1
use ticket_fields:: { TicketDescription , TicketTitle } ;
2
2
3
3
// 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`.
4
8
#[ derive( Clone ) ]
5
9
pub struct TicketStore {
6
10
tickets : Vec < Ticket > ,
You can’t perform that action at this time.
0 commit comments