Gate entire mod cookies on "cookies" feature
This commit is contained in:
@@ -1,15 +1,8 @@
|
|||||||
#[cfg(feature = "cookies")]
|
|
||||||
use {
|
|
||||||
std::ops::Deref,
|
|
||||||
std::sync::{RwLock, RwLockReadGuard},
|
|
||||||
};
|
|
||||||
|
|
||||||
#[cfg(feature = "cookies")]
|
|
||||||
use cookie_store::CookieStore;
|
use cookie_store::CookieStore;
|
||||||
#[cfg(feature = "cookies")]
|
use std::ops::Deref;
|
||||||
|
use std::sync::{RwLock, RwLockReadGuard};
|
||||||
use url::Url;
|
use url::Url;
|
||||||
|
|
||||||
#[cfg(feature = "cookies")]
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub(crate) struct CookieTin {
|
pub(crate) struct CookieTin {
|
||||||
inner: RwLock<CookieStore>,
|
inner: RwLock<CookieStore>,
|
||||||
@@ -25,7 +18,6 @@ impl<'a> Deref for CookieStoreGuard<'a> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#[cfg(feature = "cookies")]
|
|
||||||
impl CookieTin {
|
impl CookieTin {
|
||||||
pub(crate) fn new(store: CookieStore) -> Self {
|
pub(crate) fn new(store: CookieStore) -> Self {
|
||||||
CookieTin {
|
CookieTin {
|
||||||
|
|||||||
@@ -103,7 +103,6 @@
|
|||||||
|
|
||||||
mod agent;
|
mod agent;
|
||||||
mod body;
|
mod body;
|
||||||
mod cookies;
|
|
||||||
mod error;
|
mod error;
|
||||||
mod header;
|
mod header;
|
||||||
mod pool;
|
mod pool;
|
||||||
@@ -114,6 +113,9 @@ mod response;
|
|||||||
mod stream;
|
mod stream;
|
||||||
mod unit;
|
mod unit;
|
||||||
|
|
||||||
|
#[cfg(feature = "cookies")]
|
||||||
|
mod cookies;
|
||||||
|
|
||||||
#[cfg(feature = "json")]
|
#[cfg(feature = "json")]
|
||||||
pub use serde_json::json;
|
pub use serde_json::json;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user