From ce69407e385da77a4fed424802f7bd78d91a7200 Mon Sep 17 00:00:00 2001 From: Paul Woolcock Date: Thu, 23 Aug 2018 12:46:10 -0400 Subject: [PATCH] Add toml as an optional dep/feature also expand the test matrix so we test with * zero features * each feature individually * all features together --- .travis.yml | 4 +++- Cargo.toml | 8 ++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 215ed0a..e013a8f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -8,7 +8,9 @@ before_script: script: - bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "nightly"* ]]; then cargo fmt --all -- --check; fi' - cargo build - - cargo test + - cargo build --features toml + - cargo build --features all + - cargo test -- features all matrix: allow_failures: - rust: nightly diff --git a/Cargo.toml b/Cargo.toml index 6c59282..1920cc5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -18,6 +18,7 @@ serde_derive = "1" serde_json = "1" url = "1" try_from = "0.2.2" +toml = { version = "0.4.6", optional = true } [dependencies.chrono] version = "0.4" @@ -25,3 +26,10 @@ features = ["serde"] [dev-dependencies] toml = "0.4" + +[features] +default-features = [] +all = ["toml"] + +[package.metadata.docs.rs] +features = ["all"]