From 5ce6cb2aa5b801b661328ff23f9f537d6d7b4c3b Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sun, 17 Sep 2017 13:43:56 +0200 Subject: [PATCH] Switch from .set() to .insert() --- lib/entry/libimagentrytag/src/tagable.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/lib/entry/libimagentrytag/src/tagable.rs b/lib/entry/libimagentrytag/src/tagable.rs index 7b0e8135..7b9687a2 100644 --- a/lib/entry/libimagentrytag/src/tagable.rs +++ b/lib/entry/libimagentrytag/src/tagable.rs @@ -22,7 +22,7 @@ use itertools::Itertools; use libimagstore::store::Entry; use toml_query::read::TomlValueReadExt; -use toml_query::set::TomlValueSetExt; +use toml_query::insert::TomlValueInsertExt; use error::TagErrorKind; use error::TagError as TE; @@ -86,7 +86,7 @@ impl Tagable for Value { let a = ts.iter().unique().map(|t| Value::String(t.clone())).collect(); debug!("Setting tags = {:?}", a); - self.set("tags", Value::Array(a)) + self.insert("tag.values", Value::Array(a)) .map(|_| ()) .chain_err(|| TagErrorKind::HeaderWriteError) } @@ -99,6 +99,7 @@ impl Tagable for Value { self.get_tags() .map(|mut tags| { + debug!("Pushing tag = {:?} to list = {:?}", t, tags); tags.push(t); self.set_tags(&tags.into_iter().unique().collect::>()[..]) })