test(lib): fix unused warnings in doc tests
This commit is contained in:
		| @@ -50,16 +50,17 @@ impl Client<HttpConnector> { | |||||||
|     /// # Example |     /// # Example | ||||||
|     /// |     /// | ||||||
|     /// ```no_run |     /// ```no_run | ||||||
|     /// extern crate hyper; |     /// # extern crate hyper; | ||||||
|     /// extern crate tokio_core; |     /// # extern crate tokio_core; | ||||||
|     /// |     /// | ||||||
|     /// fn main() { |     /// # fn main() { | ||||||
|     /// let mut core = tokio_core::reactor::Core::new().unwrap(); |     /// # let core = tokio_core::reactor::Core::new().unwrap(); | ||||||
|     /// let handle = core.handle(); |     /// # let handle = core.handle(); | ||||||
|     /// let client = hyper::Client::configure() |     /// let client = hyper::Client::configure() | ||||||
|     ///     .keep_alive(true) |     ///     .keep_alive(true) | ||||||
|     ///     .build(&handle); |     ///     .build(&handle); | ||||||
|     /// } |     /// # drop(client); | ||||||
|  |     /// # } | ||||||
|     /// ``` |     /// ``` | ||||||
|     #[inline] |     #[inline] | ||||||
|     pub fn configure() -> Config<UseDefaultConnector> { |     pub fn configure() -> Config<UseDefaultConnector> { | ||||||
|   | |||||||
| @@ -399,7 +399,8 @@ impl Headers { | |||||||
|     /// # use hyper::header::Headers; |     /// # use hyper::header::Headers; | ||||||
|     /// # use hyper::header::ContentType; |     /// # use hyper::header::ContentType; | ||||||
|     /// # let mut headers = Headers::new(); |     /// # let mut headers = Headers::new(); | ||||||
|     /// let has_type = headers.has::<ContentType>(); |     /// headers.set(ContentType::json()); | ||||||
|  |     /// assert!(headers.has::<ContentType>()); | ||||||
|     /// ``` |     /// ``` | ||||||
|     pub fn has<H: Header>(&self) -> bool { |     pub fn has<H: Header>(&self) -> bool { | ||||||
|         self.data.contains_key(&HeaderName(UniCase(Cow::Borrowed(header_name::<H>())))) |         self.data.contains_key(&HeaderName(UniCase(Cow::Borrowed(header_name::<H>())))) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user