Fix Date header doc
This commit is contained in:
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user