Gate entire mod cookies on "cookies" feature

This commit is contained in:
Martin Algesten
2020-10-30 06:51:49 +01:00
parent d0789ae8e9
commit b66e618198
2 changed files with 5 additions and 11 deletions

View File

@@ -1,15 +1,8 @@
#[cfg(feature = "cookies")]
use {
std::ops::Deref,
std::sync::{RwLock, RwLockReadGuard},
};
#[cfg(feature = "cookies")]
use cookie_store::CookieStore;
#[cfg(feature = "cookies")]
use std::ops::Deref;
use std::sync::{RwLock, RwLockReadGuard};
use url::Url;
#[cfg(feature = "cookies")]
#[derive(Debug)]
pub(crate) struct CookieTin {
inner: RwLock<CookieStore>,
@@ -25,7 +18,6 @@ impl<'a> Deref for CookieStoreGuard<'a> {
}
}
#[cfg(feature = "cookies")]
impl CookieTin {
pub(crate) fn new(store: CookieStore) -> Self {
CookieTin {