feature flags and rustfmt

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" image: "rust:1"
pull: always pull: always
commands: commands:
- cargo test --all - cargo test --all --all-features
when: when:
event: event:
- push - push

View File

@ -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"]

View File

@ -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};

View File

@ -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
}
} }