Fetches the calendar home set

This commit is contained in:
daladim 2021-02-20 00:10:05 +01:00
parent 3f7de0e802
commit de3c9cd7c5
7 changed files with 1159 additions and 13 deletions

View file

@ -9,14 +9,18 @@ pub struct Calendar {
}
impl Calendar {
pub fn name(&self) -> String {
self.name
pub fn name(&self) -> &str {
&self.name
}
pub fn tasks(&self) -> Vec<&Task> {
self.tasks
.iter()
.map(|t| &t)
.collect()
}
pub fn task_by_id_mut(&mut self, id: TaskId) -> &mut Task {
todo!();
&mut self.tasks[0]
}
}