diff --git a/src/error.rs b/src/error.rs index a01420c..881a04c 100644 --- a/src/error.rs +++ b/src/error.rs @@ -410,10 +410,8 @@ mod tests { } #[test] - fn error_is_send_and_sync() { - fn takes_send(_: impl Send) {} - fn takes_sync(_: impl Sync) {} - takes_send(crate::error::ErrorKind::InvalidUrl.new()); - takes_sync(crate::error::ErrorKind::InvalidUrl.new()); + fn error_implements_send_and_sync() { + let _error: Box = Box::new(Error::new(ErrorKind::Io, None)); + let _error: Box = Box::new(Error::new(ErrorKind::Io, None)); } } diff --git a/src/response.rs b/src/response.rs index 97b6c54..e477aad 100644 --- a/src/response.rs +++ b/src/response.rs @@ -833,4 +833,10 @@ mod tests { let hist: Vec<&str> = response2.history.iter().map(|r| &**r).collect(); assert_eq!(hist, ["http://1.example.com/", "http://2.example.com/"]) } + + #[test] + fn response_implements_send_and_sync() { + let _response: Box = Box::new(Response::new(302, "Found", "").unwrap()); + let _response: Box = Box::new(Response::new(302, "Found", "").unwrap()); + } }