Skip to content

Commit

Permalink
fix(rustup): Send changes
Browse files Browse the repository at this point in the history
  • Loading branch information
seanmonstar committed Feb 21, 2015
1 parent 98b8c4b commit 4f5b97f
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 13 deletions.
3 changes: 3 additions & 0 deletions src/client/request.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ pub struct Request<W> {
_marker: PhantomData<W>,
}

//FIXME: remove once https://github.com/rust-lang/issues/22629 is fixed
unsafe impl<W> Send for Request<W> {}

impl<W> Request<W> {
/// Read the Request headers.
#[inline]
Expand Down
3 changes: 3 additions & 0 deletions src/client/response.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,9 @@ pub struct Response<S = HttpStream> {
_marker: PhantomData<S>,
}

//FIXME: remove once https://github.com/rust-lang/issues/22629 is fixed
unsafe impl<S: Send> Send for Response<S> {}

impl Response {

/// Creates a new response from a server.
Expand Down
12 changes: 0 additions & 12 deletions src/header/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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};

Expand All @@ -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();
Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
@@ -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))]
Expand Down

0 comments on commit 4f5b97f

Please sign in to comment.