From d9c657da731ccd02c6bccdb50a5bfb9c298705af Mon Sep 17 00:00:00 2001 From: cyderize Date: Sat, 10 Jan 2015 19:36:51 +1100 Subject: [PATCH] Make status::StatusCode_0 pass Needed to allow unstable. Also, why do we depend on typeable? Removed from Cargo.toml --- Cargo.toml | 1 - src/status.rs | 7 +++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index b33b4e33..f81e97d3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -15,7 +15,6 @@ url = "*" openssl = "*" mime = "*" unsafe-any = "*" -typeable = "*" cookie = "*" time = "*" mucell = "*" diff --git a/src/status.rs b/src/status.rs index 249c8aba..6bd267ae 100644 --- a/src/status.rs +++ b/src/status.rs @@ -1578,10 +1578,13 @@ impl Copy for StatusCode {} /// /// ```rust /// # use hyper::status::StatusCode::{ImATeapot, Code123}; -/// assert_eq!(format!("{}", ImATeapot).as_slice(), +/// # #[allow(unstable)] +/// # fn main() { +/// assert_eq!(&format!("{}", ImATeapot)[], /// "418 I'm a teapot"); -/// assert_eq!(format!("{}", Code123).as_slice(), +/// assert_eq!(&format!("{}", Code123)[], /// "123 "); +/// # } /// ``` /// /// If you wish to just include the number, cast to a u16 instead.