update Error to implement Send
BREAKING CHANGE: This does change the type of `Error::Serialize`, but should only possibly affect those constructing `Error`, not consuming it.
This commit is contained in:
@@ -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)]
|
||||
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user