From 455d6e88ed49c62e100b0153474a18b39fa47b48 Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Sat, 28 Nov 2015 13:26:29 +0100 Subject: [PATCH] Use real array instead of text array to save tags --- src/module/bm/header.rs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/module/bm/header.rs b/src/module/bm/header.rs index 616fa6f7..62c61a25 100644 --- a/src/module/bm/header.rs +++ b/src/module/bm/header.rs @@ -27,9 +27,14 @@ pub fn build_header(url: &String, tags: &Vec) -> FHD { }, FHD::Key { name: String::from("TAGS"), - value: Box::new(FHD::Text(tags.connect(","))) + value: Box::new(build_tag_array(tags)) } ] } } +fn build_tag_array(tags: &Vec) -> FHD { + let texttags = tags.into_iter().map(|t| FHD::Text(t.clone())).collect(); + FHD::Array { values: Box::new(texttags) } +} +