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

@@ -1585,13 +1585,19 @@ impl Copy for StatusCode {}
/// ```
///
/// If you wish to just include the number, cast to a u16 instead.
impl fmt::Show for StatusCode {
impl fmt::String for StatusCode {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
write!(f, "{} {}", *self as u16,
self.canonical_reason().unwrap_or("<unknown status code>"))
}
}
impl fmt::Show for StatusCode {
fn fmt(&self, fmt: &mut fmt::Formatter) -> fmt::Result {
self.to_string().fmt(fmt)
}
}
// Specified manually because the codegen for derived is slow (at the time of writing on the machine
// of writing, 1.2 seconds) and verbose (though the optimiser cuts it down to size).
impl PartialEq for StatusCode {