~matthiasbeyer/imag

d381a59a7b6d2de029977695e5b961b696e916f4 — Matthias Beyer 1 year, 11 months ago 5dcb7a9
Call clone() as late as possible

Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
1 files changed, 1 insertions(+), 2 deletions(-)

M bin/domain/imag-todo/src/import.rs
M bin/domain/imag-todo/src/import.rs => bin/domain/imag-todo/src/import.rs +1 -2
@@ 104,12 104,11 @@ fn import_taskwarrior(rt: &Runtime) -> Result<()> {

                if let Some(tags) = task.tags() {
                    tags.iter().map(|tag| {
                        let tag = tag.clone();
                        if libimagentrytag::tag::is_tag_str(&tag).is_err() {
                            warn!("Not a valid tag, ignoring: {}", tag);
                            Ok(())
                        } else {
                            todo.add_tag(tag)
                            todo.add_tag(tag.clone())
                        }
                    }).collect::<Result<Vec<_>>>()?;
                }