Fix melib test errors
parent
8b781cbbe0
commit
a907b9c21d
|
@ -26,13 +26,15 @@ use crate::error::{MeliError, Result};
|
||||||
use fnv::FnvHashMap;
|
use fnv::FnvHashMap;
|
||||||
|
|
||||||
/* Supported vcard versions */
|
/* Supported vcard versions */
|
||||||
pub trait VCardVersion {}
|
pub trait VCardVersion: core::fmt::Debug {}
|
||||||
|
|
||||||
/// https://tools.ietf.org/html/rfc6350
|
/// https://tools.ietf.org/html/rfc6350
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct VCardVersion4;
|
pub struct VCardVersion4;
|
||||||
impl VCardVersion for VCardVersion4 {}
|
impl VCardVersion for VCardVersion4 {}
|
||||||
|
|
||||||
/// https://tools.ietf.org/html/rfc2426
|
/// https://tools.ietf.org/html/rfc2426
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct VCardVersion3;
|
pub struct VCardVersion3;
|
||||||
impl VCardVersion for 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 HEADER: &'static str = "BEGIN:VCARD\r\nVERSION:4.0\r\n";
|
||||||
static FOOTER: &'static str = "END:VCARD\r\n";
|
static FOOTER: &'static str = "END:VCARD\r\n";
|
||||||
|
|
||||||
|
#[derive(Debug)]
|
||||||
pub struct VCard<T: VCardVersion>(
|
pub struct VCard<T: VCardVersion>(
|
||||||
fnv::FnvHashMap<String, ContentLine>,
|
fnv::FnvHashMap<String, ContentLine>,
|
||||||
std::marker::PhantomData<*const T>,
|
std::marker::PhantomData<*const T>,
|
||||||
|
|
|
@ -482,7 +482,7 @@ fn display_addr(input: &[u8]) -> IResult<&[u8], Address> {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
IResult::Done(
|
IResult::Done(
|
||||||
rest,
|
&input[end + display_name.length + 3..],
|
||||||
Address::Mailbox(MailboxAddress {
|
Address::Mailbox(MailboxAddress {
|
||||||
raw,
|
raw,
|
||||||
display_name,
|
display_name,
|
||||||
|
|
Loading…
Reference in New Issue