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