Skip to content

Commit 03f1cb5

Browse files
committed
docs(cookie): fix examples for Cookie and SetCookie
1 parent 092d71e commit 03f1cb5

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

src/header/common/cookie.rs

Lines changed: 1 addition & 5 deletions
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

Lines changed: 0 additions & 6 deletions
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>);

0 commit comments

Comments
 (0)