Add toml as an optional dep/feature

also expand the test matrix so we test with

* zero features
* each feature individually
* all features together
master
Paul Woolcock 6 years ago
parent ddcef1940a
commit ce69407e38
  1. 4
      .travis.yml
  2. 8
      Cargo.toml

@ -8,7 +8,9 @@ before_script:
script: script:
- bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "nightly"* ]]; then cargo fmt --all -- --check; fi' - bash -c 'if [[ "$TRAVIS_RUST_VERSION" == "nightly"* ]]; then cargo fmt --all -- --check; fi'
- cargo build - cargo build
- cargo test - cargo build --features toml
- cargo build --features all
- cargo test -- features all
matrix: matrix:
allow_failures: allow_failures:
- rust: nightly - rust: nightly

@ -18,6 +18,7 @@ serde_derive = "1"
serde_json = "1" serde_json = "1"
url = "1" url = "1"
try_from = "0.2.2" try_from = "0.2.2"
toml = { version = "0.4.6", optional = true }
[dependencies.chrono] [dependencies.chrono]
version = "0.4" version = "0.4"
@ -25,3 +26,10 @@ features = ["serde"]
[dev-dependencies] [dev-dependencies]
toml = "0.4" toml = "0.4"
[features]
default-features = []
all = ["toml"]
[package.metadata.docs.rs]
features = ["all"]

Loading…
Cancel
Save