Update for latest rust

Tracks rust nightly.

7 tests fail -- still finding source
This commit is contained in:
cyderize
2015-01-10 18:37:10 +11:00
parent 241ebc1270
commit 122e94c8a6
42 changed files with 291 additions and 189 deletions

View File

@@ -88,7 +88,7 @@ impl FromStr for Method {
}
}
impl fmt::Show for Method {
impl fmt::String for Method {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
match *self {
Options => "OPTIONS",
@@ -105,6 +105,12 @@ impl fmt::Show for Method {
}
}
impl fmt::Show for Method {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
self.to_string().fmt(fmt)
}
}
#[cfg(test)]
mod tests {
use std::collections::HashMap;
@@ -141,7 +147,7 @@ mod tests {
#[test]
fn test_hashable() {
let mut counter: HashMap<Method,uint> = HashMap::new();
let mut counter: HashMap<Method,usize> = HashMap::new();
counter.insert(Get, 1);
assert_eq!(Some(&1), counter.get(&Get));
}