Skip to content

Commit 0167f57

Browse files
committed
docs(cookie): fix examples for Cookie and SetCookie
1 parent 637b170 commit 0167f57

File tree

3 files changed

+1
-12
lines changed

3 files changed

+1
-12
lines changed

src/header/common/cookie.rs

+1-5
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,15 @@ use std::str::from_utf8;
1717
///
1818
/// # Example
1919
/// ```
20-
/// # extern crate hyper;
21-
/// # extern crate cookie;
22-
/// # fn main() {
2320
/// use hyper::header::{Headers, Cookie};
2421
///
2522
/// let mut headers = Headers::new();
2623
///
2724
/// headers.set(
2825
/// Cookie(vec![
29-
/// CookiePair::new("foo".to_owned(), "bar".to_owned())
26+
/// String::from("foo=bar")
3027
/// ])
3128
/// );
32-
/// # }
3329
/// ```
3430
#[derive(Clone, PartialEq, Debug)]
3531
pub struct Cookie(pub Vec<String>);

src/header/common/set_cookie.rs

-6
Original file line numberDiff line numberDiff line change
@@ -55,11 +55,6 @@ use std::str::from_utf8;
5555
///
5656
/// # Example
5757
/// ```
58-
/// # extern crate hyper;
59-
/// # extern crate cookie;
60-
/// # fn main() {
61-
/// // extern crate cookie;
62-
///
6358
/// use hyper::header::{Headers, SetCookie};
6459
///
6560
/// let mut headers = Headers::new();
@@ -69,7 +64,6 @@ use std::str::from_utf8;
6964
/// String::from("foo=bar; Path=/path; Domain=example.com")
7065
/// ])
7166
/// );
72-
/// # }
7367
/// ```
7468
#[derive(Clone, PartialEq, Debug)]
7569
pub struct SetCookie(pub Vec<String>);

src/lib.rs

-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ extern crate time;
2626
#[macro_use] extern crate tokio_core as tokio;
2727
extern crate tokio_proto;
2828
extern crate tokio_service;
29-
#[macro_use] extern crate url;
3029
extern crate unicase;
3130
#[macro_use] extern crate url;
3231

0 commit comments

Comments
 (0)