feature flags and rustfmt
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
This commit is contained in:
parent
c7d8767bf6
commit
112c5969d8
|
@ -6,7 +6,7 @@ steps:
|
||||||
image: "rust:1"
|
image: "rust:1"
|
||||||
pull: always
|
pull: always
|
||||||
commands:
|
commands:
|
||||||
- cargo test --all
|
- cargo test --all --all-features
|
||||||
when:
|
when:
|
||||||
event:
|
event:
|
||||||
- push
|
- push
|
||||||
|
|
11
Cargo.toml
11
Cargo.toml
|
@ -10,12 +10,17 @@ edition = "2018"
|
||||||
num = "0.2"
|
num = "0.2"
|
||||||
num-derive = "0.3"
|
num-derive = "0.3"
|
||||||
num-traits = "0.2"
|
num-traits = "0.2"
|
||||||
rustls = "0.18"
|
rustls = { version = "0.18", optional = true }
|
||||||
webpki = "0.21.0"
|
webpki = { version = "0.21.0", optional = true }
|
||||||
webpki-roots = "0.20"
|
webpki-roots = { version = "0.20", optional = true }
|
||||||
log = "0.4"
|
log = "0.4"
|
||||||
url = "2"
|
url = "2"
|
||||||
thiserror = "1"
|
thiserror = "1"
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
pretty_env_logger = "0.4"
|
pretty_env_logger = "0.4"
|
||||||
|
|
||||||
|
[features]
|
||||||
|
default = ["client"]
|
||||||
|
|
||||||
|
client = ["rustls", "webpki", "webpki-roots"]
|
||||||
|
|
|
@ -1,7 +1,10 @@
|
||||||
mod client;
|
|
||||||
mod status_code;
|
|
||||||
mod response;
|
mod response;
|
||||||
|
mod status_code;
|
||||||
|
|
||||||
|
pub use response::{Error as ResponseError, Response};
|
||||||
pub use status_code::StatusCode;
|
pub use status_code::StatusCode;
|
||||||
pub use response::{Response, Error as ResponseError};
|
|
||||||
|
#[cfg(feature = "client")]
|
||||||
|
mod client;
|
||||||
|
#[cfg(feature = "client")]
|
||||||
pub use client::{get, Error as ClientError};
|
pub use client::{get, Error as ClientError};
|
||||||
|
|
|
@ -119,5 +119,7 @@ pub enum StatusCode {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Default for StatusCode {
|
impl Default for StatusCode {
|
||||||
fn default() -> Self { StatusCode::Success }
|
fn default() -> Self {
|
||||||
|
StatusCode::Success
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue