Build SetCookie from CookieJar

This commit is contained in:
Stanislav Panferov
2014-10-08 10:47:09 +04:00
committed by Sean McArthur
parent 0a624b10e0
commit 20f156c592

View File

@@ -1,6 +1,7 @@
use header::Header;
use std::fmt;
use std::str::from_utf8;
use cookie::CookieJar;
/// The `Set-Cookie` header
///
@@ -40,3 +41,12 @@ impl Header for SetCookie {
}
}
impl SetCookie {
/// Use this to crate SetCookie header from CookieJar using
/// calculated delta.
#[allow(dead_code)]
fn from_cookie_jar(jar: &CookieJar) -> SetCookie {
SetCookie(jar.delta())
}
}