diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-07-15 15:42:02 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-07-21 17:14:12 +0200 |
commit | 8e4471cc07385d3dcbb210cbf4733f3584d087b8 (patch) | |
tree | a6be09bace41ae507fb753e2b3b4e1fa8a82ffc9 | |
parent | 077471f3da318518eebae937c089a43f475cde80 (diff) |
Impl Task::retrieve_from_import()
-rw-r--r-- | libimagtodo/src/task.rs | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/libimagtodo/src/task.rs b/libimagtodo/src/task.rs index 4e46feff..c4f0f51b 100644 --- a/libimagtodo/src/task.rs +++ b/libimagtodo/src/task.rs @@ -83,7 +83,9 @@ impl<'a> Task<'a> { /// Same as Task::get_from_import() but uses Store::retrieve() rather than Store::get(), to /// implicitely create the task if it does not exist. pub fn retrieve_from_import<R: BufRead>(store: &'a Store, mut r: R) -> Result<Task<'a>> { - unimplemented!() + let mut line = String::new(); + r.read_line(&mut line); + Task::retrieve_from_string(store, line) } /// Retrieve a task from a String. The String is expected to contain the JSON-representation of |