diff --git a/src/client/request.rs b/src/client/request.rs index 9862aeae66..2bd150a523 100644 --- a/src/client/request.rs +++ b/src/client/request.rs @@ -30,6 +30,9 @@ pub struct Request { _marker: PhantomData, } +//FIXME: remove once https://github.com/rust-lang/issues/22629 is fixed +unsafe impl Send for Request {} + impl Request { /// Read the Request headers. #[inline] diff --git a/src/client/response.rs b/src/client/response.rs index 5ded928ef3..dbff0bbbc7 100644 --- a/src/client/response.rs +++ b/src/client/response.rs @@ -28,6 +28,9 @@ pub struct Response { _marker: PhantomData, } +//FIXME: remove once https://github.com/rust-lang/issues/22629 is fixed +unsafe impl Send for Response {} + impl Response { /// Creates a new response from a server. diff --git a/src/header/mod.rs b/src/header/mod.rs index b846a568d9..a59538cde6 100644 --- a/src/header/mod.rs +++ b/src/header/mod.rs @@ -531,12 +531,9 @@ impl<'a, H: HeaderFormat> fmt::Debug for HeaderFormatter<'a, H> { mod tests { use std::old_io::MemReader; use std::fmt; - use std::borrow::Cow::Borrowed; - use std::hash::{SipHasher, hash}; use mime::Mime; use mime::TopLevel::Text; use mime::SubLevel::Plain; - use unicase::UniCase; use super::{Headers, Header, HeaderFormat, ContentLength, ContentType, Accept, Host, QualityItem}; @@ -546,15 +543,6 @@ mod tests { MemReader::new(s.as_bytes().to_vec()) } - #[test] - fn test_case_insensitive() { - let a = UniCase(Borrowed("foobar")); - let b = UniCase(Borrowed("FOOBAR")); - - assert_eq!(a, b); - assert_eq!(hash::<_, SipHasher>(&a), hash::<_, SipHasher>(&b)); - } - #[test] fn test_from_raw() { let headers = Headers::from_raw(&mut mem("Content-Length: 10\r\n\r\n")).unwrap(); diff --git a/src/lib.rs b/src/lib.rs index cc71b61108..9a651fcc12 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -1,4 +1,4 @@ -#![feature(core, collections, hash, io, old_io, os, old_path, +#![feature(core, collections, io, old_io, os, old_path, std_misc, box_syntax, unsafe_destructor)] #![deny(missing_docs)] #![cfg_attr(test, deny(warnings))]