implement Clone for Client
This commit is contained in:
		| @@ -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 { | ||||
|   | ||||
| @@ -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>(); | ||||
|   | ||||
		Reference in New Issue
	
	Block a user