feature flags and rustfmt
continuous-integration/drone/push Build is passing Details

This commit is contained in:
Cadey Ratio 2020-07-25 11:03:15 -04:00
parent c7d8767bf6
commit 112c5969d8
4 changed files with 19 additions and 9 deletions

View File

@ -6,7 +6,7 @@ steps:
image: "rust:1"
pull: always
commands:
- cargo test --all
- cargo test --all --all-features
when:
event:
- push

View File

@ -10,12 +10,17 @@ edition = "2018"
num = "0.2"
num-derive = "0.3"
num-traits = "0.2"
rustls = "0.18"
webpki = "0.21.0"
webpki-roots = "0.20"
rustls = { version = "0.18", optional = true }
webpki = { version = "0.21.0", optional = true }
webpki-roots = { version = "0.20", optional = true }
log = "0.4"
url = "2"
thiserror = "1"
[dev-dependencies]
pretty_env_logger = "0.4"
[features]
default = ["client"]
client = ["rustls", "webpki", "webpki-roots"]

View File

@ -1,7 +1,10 @@
mod client;
mod status_code;
mod response;
mod status_code;
pub use response::{Error as ResponseError, Response};
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};

View File

@ -119,5 +119,7 @@ pub enum StatusCode {
}
impl Default for StatusCode {
fn default() -> Self { StatusCode::Success }
fn default() -> Self {
StatusCode::Success
}
}