Add cookie_rs as default feature and implement conditional compilation.

This commit is contained in:
Stanislav Panferov
2014-10-08 11:38:01 +04:00
committed by Sean McArthur
parent 20f156c592
commit a3fc51611f
4 changed files with 33 additions and 14 deletions

View File

@@ -1,6 +1,8 @@
use header::Header;
use std::fmt;
use std::str::from_utf8;
#[cfg(feature = "cookie_rs")]
use cookie::CookieJar;
/// The `Set-Cookie` header
@@ -45,6 +47,7 @@ impl SetCookie {
/// Use this to crate SetCookie header from CookieJar using
/// calculated delta.
#[allow(dead_code)]
#[cfg(feature = "cookie_rs")]
fn from_cookie_jar(jar: &CookieJar) -> SetCookie {
SetCookie(jar.delta())
}