feat(headers): add CacheControl header

This commit is contained in:
Sean McArthur
2014-12-01 19:58:07 -08:00
parent 0297147dd1
commit f182f53210
4 changed files with 179 additions and 5 deletions

View File

@@ -76,14 +76,13 @@ impl Header for TransferEncoding {
}
fn parse_header(raw: &[Vec<u8>]) -> Option<TransferEncoding> {
from_comma_delimited(raw).map(|vec| TransferEncoding(vec))
from_comma_delimited(raw).map(TransferEncoding)
}
}
impl HeaderFormat for TransferEncoding {
fn fmt_header(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
let TransferEncoding(ref parts) = *self;
fmt_comma_delimited(fmt, parts[])
fmt_comma_delimited(fmt, self[])
}
}