docs(cookie): fix examples for Cookie and SetCookie
This commit is contained in:
		| @@ -17,19 +17,15 @@ use std::str::from_utf8; | ||||
| /// | ||||
| /// # Example | ||||
| /// ``` | ||||
| /// # extern crate hyper; | ||||
| /// # extern crate cookie; | ||||
| /// # fn main() { | ||||
| /// use hyper::header::{Headers, Cookie}; | ||||
| /// | ||||
| /// let mut headers = Headers::new(); | ||||
| /// | ||||
| /// headers.set( | ||||
| ///    Cookie(vec![ | ||||
| ///        CookiePair::new("foo".to_owned(), "bar".to_owned()) | ||||
| ///        String::from("foo=bar") | ||||
| ///    ]) | ||||
| /// ); | ||||
| /// # } | ||||
| /// ``` | ||||
| #[derive(Clone, PartialEq, Debug)] | ||||
| pub struct Cookie(pub Vec<String>); | ||||
|   | ||||
| @@ -55,11 +55,6 @@ use std::str::from_utf8; | ||||
| /// | ||||
| /// # Example | ||||
| /// ``` | ||||
| /// # extern crate hyper; | ||||
| /// # extern crate cookie; | ||||
| /// # fn main() { | ||||
| /// // extern crate cookie; | ||||
| /// | ||||
| /// use hyper::header::{Headers, SetCookie}; | ||||
| /// | ||||
| /// let mut headers = Headers::new(); | ||||
| @@ -69,7 +64,6 @@ use std::str::from_utf8; | ||||
| ///         String::from("foo=bar; Path=/path; Domain=example.com") | ||||
| ///     ]) | ||||
| /// ); | ||||
| /// # } | ||||
| /// ``` | ||||
| #[derive(Clone, PartialEq, Debug)] | ||||
| pub struct SetCookie(pub Vec<String>); | ||||
|   | ||||
| @@ -26,7 +26,6 @@ extern crate time; | ||||
| #[macro_use] extern crate tokio_core as tokio; | ||||
| extern crate tokio_proto; | ||||
| extern crate tokio_service; | ||||
| #[macro_use] extern crate url; | ||||
| extern crate unicase; | ||||
| #[macro_use] extern crate url; | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user