fix(rustup): update to newest fmt trait names and slice syntax

This commit is contained in:
Sean McArthur
2015-01-23 14:17:19 -08:00
parent bb4f913ede
commit 9e3c94d764
38 changed files with 90 additions and 114 deletions

View File

@@ -13,7 +13,7 @@ use self::Method::{Options, Get, Post, Put, Delete, Head, Trace, Connect, Patch,
///
/// It may make sense to grow this to include all variants currently
/// registered with IANA, if they are at all common to use.
#[derive(Clone, PartialEq, Eq, Hash, Show)]
#[derive(Clone, PartialEq, Eq, Hash, Debug)]
pub enum Method {
/// OPTIONS
Options,
@@ -88,9 +88,9 @@ impl FromStr for Method {
}
}
impl fmt::String for Method {
impl fmt::Display for Method {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
match *self {
fmt.write_str(match *self {
Options => "OPTIONS",
Get => "GET",
Post => "POST",
@@ -101,7 +101,7 @@ impl fmt::String for Method {
Connect => "CONNECT",
Patch => "PATCH",
Extension(ref s) => s.as_slice()
}.fmt(fmt)
})
}
}