update to newest cookie-rs

This commit is contained in:
Sean McArthur
2014-11-10 11:13:20 -08:00
parent 33210641f7
commit fcfb0505dd
3 changed files with 2 additions and 9 deletions

View File

@@ -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));
}

View File

@@ -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;

View File

@@ -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())
}
}