From 713621337f7f71e583e5a3ab2dd3d5a83040486f Mon Sep 17 00:00:00 2001 From: Matthias Beyer Date: Fri, 27 Apr 2018 13:48:18 +0200 Subject: [PATCH] Adapt for new libimagcontact interface --- bin/domain/imag-contact/src/main.rs | 2 +- bin/domain/imag-contact/src/util.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/bin/domain/imag-contact/src/main.rs b/bin/domain/imag-contact/src/main.rs index 86c98457..06488e75 100644 --- a/bin/domain/imag-contact/src/main.rs +++ b/bin/domain/imag-contact/src/main.rs @@ -277,7 +277,7 @@ fn find(rt: &Runtime) { }; let take = card.adr().iter().any(|a| str_contains_any(a, &grepstring)) - || card.email().iter().any(|a| str_contains_any(a, &grepstring)) + || card.email().iter().any(|a| str_contains_any(&a.address, &grepstring)) || card.fullname().iter().any(|a| str_contains_any(a, &grepstring)); if take { diff --git a/bin/domain/imag-contact/src/util.rs b/bin/domain/imag-contact/src/util.rs index 91e00783..61409941 100644 --- a/bin/domain/imag-contact/src/util.rs +++ b/bin/domain/imag-contact/src/util.rs @@ -45,7 +45,7 @@ pub fn build_data_object_for_handlebars<'a>(i: usize, vcard: &DeserVcard) -> BTr data.insert("BDAY" , process_opt(vcard.bday())); data.insert("CATEGORIES" , process_list(vcard.categories())); data.insert("CLIENTPIDMAP" , process_opt(vcard.clientpidmap())); - data.insert("EMAIL" , process_list(vcard.email())); + data.insert("EMAIL" , process_list(&vcard.email().iter().map(|a| a.address.clone()).collect())); data.insert("FN" , process_list(vcard.fullname())); data.insert("GENDER" , process_opt(vcard.gender())); data.insert("GEO" , process_list(vcard.geo()));