Fix a couple of feature flag uses
Wrap a json doc-test in cfg block to stop in failing when tests are run with --no-default-features
This commit is contained in:
committed by
Martin Algesten
parent
71a9df17e3
commit
b61991d87e
@@ -8,6 +8,7 @@
|
|||||||
//!
|
//!
|
||||||
//! ```
|
//! ```
|
||||||
//! // requires feature: `ureq = { version = "*", features = ["json"] }`
|
//! // requires feature: `ureq = { version = "*", features = ["json"] }`
|
||||||
|
//! # #[cfg(feature = "json")] {
|
||||||
//! use ureq::json;
|
//! use ureq::json;
|
||||||
//!
|
//!
|
||||||
//! // sync post request of some json.
|
//! // sync post request of some json.
|
||||||
@@ -22,6 +23,7 @@
|
|||||||
//! if resp.ok() {
|
//! if resp.ok() {
|
||||||
//! // ....
|
//! // ....
|
||||||
//! }
|
//! }
|
||||||
|
//! # }
|
||||||
//! ```
|
//! ```
|
||||||
//!
|
//!
|
||||||
//! # Plain requests
|
//! # Plain requests
|
||||||
|
|||||||
@@ -16,6 +16,7 @@ use crate::{Error, Header, Request, Response};
|
|||||||
#[cfg(feature = "tls")]
|
#[cfg(feature = "tls")]
|
||||||
use crate::request::TLSClientConfig;
|
use crate::request::TLSClientConfig;
|
||||||
|
|
||||||
|
#[cfg(feature = "cookie")]
|
||||||
use crate::pool::DEFAULT_HOST;
|
use crate::pool::DEFAULT_HOST;
|
||||||
|
|
||||||
/// It's a "unit of work". Maybe a bad name for it?
|
/// It's a "unit of work". Maybe a bad name for it?
|
||||||
|
|||||||
Reference in New Issue
Block a user