Fix Date header doc

This commit is contained in:
Alexis Mousset
2014-12-12 23:13:29 +01:00
parent 51dd309274
commit ce52016361
2 changed files with 3 additions and 6 deletions

View File

@@ -64,10 +64,8 @@ pub enum Header {
impl Show for Header {
fn fmt(&self, f: &mut Formatter) -> Result {
f.write(format!("{}{}{}{}",
match *self {
Header::To(_) => "To",
Header::From(_) => "From",
Header::Cc(_) => "Cc",
@@ -93,8 +91,7 @@ impl Show for Header {
Header::ContentType(ref string) => string.clone(),
Header::MessageId(ref string) => string.clone(),
Header::Other(_, ref value) => value.clone(),
}
).as_bytes())
}).as_bytes())
}
}

View File

@@ -114,14 +114,14 @@ impl Email {
);
}
/// Adds a `Date` header with the current time
/// Adds a `Date` header with the current date
pub fn date_now(&mut self) {
self.headers.push(
Header::Date(now())
);
}
/// Adds a `Date` header with the current time
/// Adds a `Date` header with the given date
pub fn date(&mut self, date: Tm) {
self.headers.push(
Header::Date(date)