Fix melib test errors

sql
Manos Pitsidianakis 2019-11-09 18:10:22 +02:00
parent 8b781cbbe0
commit a907b9c21d
Signed by: Manos Pitsidianakis
GPG Key ID: 73627C2F690DF710
2 changed files with 5 additions and 2 deletions

View File

@ -26,13 +26,15 @@ use crate::error::{MeliError, Result};
use fnv::FnvHashMap;
/* Supported vcard versions */
pub trait VCardVersion {}
pub trait VCardVersion: core::fmt::Debug {}
/// https://tools.ietf.org/html/rfc6350
#[derive(Debug)]
pub struct VCardVersion4;
impl VCardVersion for VCardVersion4 {}
/// https://tools.ietf.org/html/rfc2426
#[derive(Debug)]
pub struct VCardVersion3;
impl VCardVersion for VCardVersion3 {}
@ -41,6 +43,7 @@ pub struct CardDeserializer;
static HEADER: &'static str = "BEGIN:VCARD\r\nVERSION:4.0\r\n";
static FOOTER: &'static str = "END:VCARD\r\n";
#[derive(Debug)]
pub struct VCard<T: VCardVersion>(
fnv::FnvHashMap<String, ContentLine>,
std::marker::PhantomData<*const T>,

View File

@ -482,7 +482,7 @@ fn display_addr(input: &[u8]) -> IResult<&[u8], Address> {
}
};
IResult::Done(
rest,
&input[end + display_name.length + 3..],
Address::Mailbox(MailboxAddress {
raw,
display_name,