update to newest cookie-rs
This commit is contained in:
@@ -51,7 +51,7 @@ impl HeaderFormat for Cookies {
|
|||||||
let cookies = &self.0;
|
let cookies = &self.0;
|
||||||
let last = cookies.len() - 1;
|
let last = cookies.len() - 1;
|
||||||
for (i, cookie) in cookies.iter().enumerate() {
|
for (i, cookie) in cookies.iter().enumerate() {
|
||||||
try!(write!(fmt, "{}={}", cookie.name, cookie.value));
|
try!(cookie.pair().fmt(fmt));
|
||||||
if i < last {
|
if i < last {
|
||||||
try!("; ".fmt(fmt));
|
try!("; ".fmt(fmt));
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -33,12 +33,6 @@ pub mod authorization;
|
|||||||
/// Exposes the Cookie header.
|
/// Exposes the Cookie header.
|
||||||
pub mod cookie;
|
pub mod cookie;
|
||||||
|
|
||||||
/// Exposes the Cookie header.
|
|
||||||
pub mod cookie;
|
|
||||||
|
|
||||||
/// Exposes the Set-Cookie header.
|
|
||||||
pub mod set_cookie;
|
|
||||||
|
|
||||||
/// Exposes the Connection header.
|
/// Exposes the Connection header.
|
||||||
pub mod connection;
|
pub mod connection;
|
||||||
|
|
||||||
|
|||||||
@@ -59,8 +59,7 @@ impl SetCookie {
|
|||||||
/// Use this to create SetCookie header from CookieJar using
|
/// Use this to create SetCookie header from CookieJar using
|
||||||
/// calculated delta.
|
/// calculated delta.
|
||||||
pub fn from_cookie_jar(jar: &CookieJar) -> SetCookie {
|
pub fn from_cookie_jar(jar: &CookieJar) -> SetCookie {
|
||||||
//FIXME: https://github.com/alexcrichton/cookie-rs/issues/2
|
SetCookie(jar.delta())
|
||||||
SetCookie(jar.delta().into_iter().map(|s| from_str(s[]).unwrap()).collect())
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user