fix(header): fix fmt_header outputs of several headers

Closes #246
This commit is contained in:
Sean McArthur
2015-01-13 10:42:01 -08:00
parent cfebdabc1a
commit aa26665367
11 changed files with 45 additions and 62 deletions

View File

@@ -33,7 +33,7 @@ deref!(TransferEncoding => Vec<Encoding>);
/// # use hyper::header::Headers;
/// # let mut headers = Headers::new();
/// headers.set(TransferEncoding(vec![Gzip, Chunked]));
#[derive(Clone, PartialEq)]
#[derive(Clone, PartialEq, Show)]
pub enum Encoding {
/// The `chunked` encoding.
Chunked,
@@ -59,12 +59,6 @@ impl fmt::String for Encoding {
}
}
impl fmt::Show for Encoding {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
self.to_string().fmt(fmt)
}
}
impl FromStr for Encoding {
fn from_str(s: &str) -> Option<Encoding> {
match s {