completed till 06/07
This commit is contained in:
@@ -7,6 +7,18 @@ pub struct TicketStore {
|
||||
tickets: Vec<Ticket>,
|
||||
}
|
||||
|
||||
impl TicketStore {
|
||||
fn to_dos(&self) -> Vec<&Ticket> {
|
||||
self.tickets
|
||||
.iter()
|
||||
.filter(|&a| match a.status {
|
||||
Status::ToDo => true,
|
||||
_ => false,
|
||||
})
|
||||
.collect::<Vec<_>>()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug, PartialEq)]
|
||||
pub struct Ticket {
|
||||
pub title: TicketTitle,
|
||||
|
||||
Reference in New Issue
Block a user