diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2019-11-10 12:39:11 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2019-12-22 02:03:35 +0100 |
commit | 6d2ccbc209b12561ac94a9645f73f05f3318b2c3 (patch) | |
tree | 97101be65b44436333a7f461addf85596ea33256 /bin/domain/imag-todo/src | |
parent | 1ed34a162fefa7efb33a1caff830f74ba200dfe8 (diff) |
Do not call clone() on a Copy type
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'bin/domain/imag-todo/src')
-rw-r--r-- | bin/domain/imag-todo/src/import.rs | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/bin/domain/imag-todo/src/import.rs b/bin/domain/imag-todo/src/import.rs index 6194bcbd..ca812b71 100644 --- a/bin/domain/imag-todo/src/import.rs +++ b/bin/domain/imag-todo/src/import.rs @@ -89,12 +89,11 @@ fn import_taskwarrior(rt: &Runtime) -> Result<()> { taskwarrior_import(stdin)? .into_iter() .map(|task| { - let hash = task.uuid().clone(); let mut todo = store .todo_builder() .with_check_sanity(false) // data should be imported, even if it is not sane .with_status(translate_status(task.status())) - .with_uuid(Some(task.uuid().clone())) + .with_uuid(Some(*task.uuid())) .with_due(task.due().map(Deref::deref).cloned()) .with_scheduled(task.scheduled().map(Deref::deref).cloned()) .with_hidden(task.wait().map(Deref::deref).cloned()) @@ -130,7 +129,7 @@ fn import_taskwarrior(rt: &Runtime) -> Result<()> { } let dependends = task.depends().cloned().unwrap_or_else(|| vec![]); - Ok((hash, dependends)) + Ok((*task.uuid(), dependends)) }) .collect::<Result<HashMap<Uuid, Vec<Uuid>>>>()? |