summaryrefslogtreecommitdiffstats
path: root/lib/domain/libimagtimetrack/src/timetrackingstore.rs
diff options
context:
space:
mode:
authorMatthias Beyer <mail@beyermatthias.de>2019-05-18 13:37:46 +0200
committerMatthias Beyer <mail@beyermatthias.de>2019-05-18 13:37:46 +0200
commit5c8af4460e14a63a8d7fd9aaf0dcb5edb0e19e4a (patch)
tree7b7821ecc9c865723e0f6c457d8b0f5a11ac34ab /lib/domain/libimagtimetrack/src/timetrackingstore.rs
parent55a7c268d7351f8586d96b81e4f014bb3781373b (diff)
Fix: Entries::in_collection() should be able to return error
This patch changes the Entries::in_collection() interface to return a Result<()>. This is needed because the fs backend implementation should be able to check whether a directory actually exists whenever we change the iterator. If the implementation detects that the directory does not exist, we can fail early and error out. All usages of the interface are adapted by the patch as well. Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'lib/domain/libimagtimetrack/src/timetrackingstore.rs')
-rw-r--r--lib/domain/libimagtimetrack/src/timetrackingstore.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/domain/libimagtimetrack/src/timetrackingstore.rs b/lib/domain/libimagtimetrack/src/timetrackingstore.rs
index 967c8958..bf25a4df 100644
--- a/lib/domain/libimagtimetrack/src/timetrackingstore.rs
+++ b/lib/domain/libimagtimetrack/src/timetrackingstore.rs
@@ -107,7 +107,7 @@ impl<'a> TimeTrackStore<'a> for Store {
}
fn get_timetrackings(&'a self) -> Result<TimeTrackingsGetIterator<'a>> {
- Ok(TimeTrackingsGetIterator::new(self.entries()?.in_collection("timetrack"), self))
+ Ok(TimeTrackingsGetIterator::new(self.entries()?.in_collection("timetrack")?, self))
}
}