diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2016-08-06 10:11:22 +0200 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2016-08-06 10:11:22 +0200 |
commit | d0592d002956468fee6c9edd994667541ea97ccb (patch) | |
tree | e5ceb6c0a3186538cb3c38d4e19aa6b6fb18c93d /libimagtodo | |
parent | 01ee30537ea732edc7886cd5fbdc30f1ab6c13f9 (diff) |
Return the imported string as well
Diffstat (limited to 'libimagtodo')
-rw-r--r-- | libimagtodo/src/task.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/libimagtodo/src/task.rs b/libimagtodo/src/task.rs index c4f0f51b..c57640a7 100644 --- a/libimagtodo/src/task.rs +++ b/libimagtodo/src/task.rs @@ -27,14 +27,14 @@ impl<'a> Task<'a> { Task(fle) } - pub fn import<R: BufRead>(store: &'a Store, mut r: R) -> Result<(Task<'a>, Uuid)> { + pub fn import<R: BufRead>(store: &'a Store, mut r: R) -> Result<(Task<'a>, String, Uuid)> { let mut line = String::new(); r.read_line(&mut line); import_task(&line.as_str()) .map_err_into(TodoErrorKind::ImportError) .and_then(|t| { let uuid = t.uuid().clone(); - t.into_task(store).map(|t| (t, uuid)) + t.into_task(store).map(|t| (t, line, uuid)) }) } |