diff options
Diffstat (limited to 'karlgui/src/globals.rs')
-rw-r--r-- | karlgui/src/globals.rs | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/karlgui/src/globals.rs b/karlgui/src/globals.rs index 202cce6..48af280 100644 --- a/karlgui/src/globals.rs +++ b/karlgui/src/globals.rs @@ -52,23 +52,7 @@ impl Globals { } } } - pub fn get_all_instances_range( - &mut self, - start: NaiveDateTime, - end: NaiveDateTime, - ) -> Option<Vec<(u64, Range<Option<NaiveDateTime>>)>> { - let mut l = vec![]; - for t in &self.tasks.values().map(|e| e.id).collect::<Vec<_>>() { - if let Some(r) = self.get_instances_range(*t, start, end) { - l.extend(r.into_iter().map(|e| (*t, e.clone()))); - } - } - if l.len() > 0 { - Some(l) - } else { - None - } - } + pub fn get_instances_range( &mut self, task: u64, |