diff --git a/src/json.rs b/src/json.rs index 389ca4a..f5b31b9 100644 --- a/src/json.rs +++ b/src/json.rs @@ -1,3 +1,8 @@ +#![cfg_attr( + not(any(feature = "http-client", feature = "async-http-client")), + allow(dead_code) +)] + use crate::Error; /// Shortcut for [`serde_json::from_str`] with [`crate::Error`]. diff --git a/src/lib.rs b/src/lib.rs index 1838815..14b7f82 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -25,7 +25,7 @@ mod client_reqwest; #[cfg(feature = "http-client")] mod client_ureq; mod error; -#[cfg(any(feature = "http-client", feature = "async-http-client"))] +#[cfg(any(test, feature = "http-client", feature = "async-http-client"))] mod json; mod macros; pub mod objects;