implement Clone for Client

This commit is contained in:
Sean McArthur
2017-04-05 11:22:19 -07:00
parent ca6c042b96
commit 517e8f0aa5
2 changed files with 4 additions and 1 deletions

View File

@@ -28,8 +28,9 @@ static DEFAULT_USER_AGENT: &'static str = concat!(env!("CARGO_PKG_NAME"), "/", e
///
/// The `Client` holds a connection pool internally, so it is advised that
/// you create one and reuse it.
#[derive(Clone)]
pub struct Client {
inner: Arc<ClientRef>, //::hyper::Client,
inner: Arc<ClientRef>,
}
impl Client {

View File

@@ -151,9 +151,11 @@ pub fn get<T: IntoUrl>(url: T) -> ::Result<Response> {
fn _assert_impls() {
fn assert_send<T: Send>() {}
fn assert_sync<T: Sync>() {}
fn assert_clone<T: Clone>() {}
assert_send::<Client>();
assert_sync::<Client>();
assert_clone::<Client>();
assert_send::<RequestBuilder>();
assert_send::<Response>();