Skip to content

Commit

Permalink
update Error to implement Send
Browse files Browse the repository at this point in the history
BREAKING CHANGE: This does change the type of `Error::Serialize`, but
  should only possibly affect those constructing `Error`, not consuming it.
  • Loading branch information
seanmonstar committed Nov 21, 2016
1 parent a580af2 commit 20b1610
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ pub enum Error {
///
/// This may be serializing a value that is illegal in JSON or
/// form-url-encoded bodies.
Serialize(Box<StdError>),
Serialize(Box<StdError + Send + Sync>),
/// A request tried to redirect too many times.
TooManyRedirects,
#[doc(hidden)]
Expand Down Expand Up @@ -50,6 +50,12 @@ impl StdError for Error {
}
}

fn _assert_types() {
fn _assert_send<T: Send>() {
}
_assert_send::<Error>();
}

impl From<::hyper::Error> for Error {
fn from(err: ::hyper::Error) -> Error {
Error::Http(err)
Expand Down

0 comments on commit 20b1610

Please sign in to comment.