diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2018-07-22 15:47:31 +0100 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2018-07-22 15:47:31 +0100 |
commit | 7a994eb95b0fa447e95d7d28a020fd30143b87b6 (patch) | |
tree | c33ce2285a171028e96732560408b1c3f6d0486a | |
parent | 879832099565fa051c3877558f85a8e194dc0ce6 (diff) | |
download | askama-7a994eb95b0fa447e95d7d28a020fd30143b87b6.tar.gz askama-7a994eb95b0fa447e95d7d28a020fd30143b87b6.tar.bz2 askama-7a994eb95b0fa447e95d7d28a020fd30143b87b6.zip |
Work around conflicting dependencies for actix-web and rocket
-rw-r--r-- | .travis.yml | 2 | ||||
-rw-r--r-- | testing/Cargo.toml | 13 | ||||
-rw-r--r-- | testing/tests/actix_web.rs | 1 | ||||
-rw-r--r-- | testing/tests/rocket.rs | 2 |
4 files changed, 10 insertions, 8 deletions
diff --git a/.travis.yml b/.travis.yml index b223b97..d79163f 100644 --- a/.travis.yml +++ b/.travis.yml @@ -12,4 +12,4 @@ matrix: - rustup component add rustfmt-preview - rustup component add clippy-preview script: - - cargo test --all-features + - cd testing && cargo test --no-default-features --features with-rocket diff --git a/testing/Cargo.toml b/testing/Cargo.toml index 6223673..7c93783 100644 --- a/testing/Cargo.toml +++ b/testing/Cargo.toml @@ -5,13 +5,14 @@ authors = ["Dirkjan Ochtman <dirkjan@ochtman.nl>"] workspace = ".." [features] -default = [] -nightly = ["rocket", "rocket_codegen", "askama/with-rocket"] +default = ["actix"] +with-rocket = ["rocket", "rocket_codegen", "askama/with-rocket"] +actix = ["actix-web", "bytes", "askama/with-actix-web"] [dependencies] -actix-web = "0.7" -askama = { path = "../askama", version = "*", features = ["with-actix-web", "with-iron", "serde-json"] } -bytes = "0.4" +actix-web = { version = "0.7", optional = true } +askama = { path = "../askama", version = "*", features = ["with-iron", "serde-json"] } +bytes = { version = "0.4", optional = true } criterion = "0.2" iron = "0.6" rocket = { version = "0.3", optional = true } @@ -19,7 +20,7 @@ rocket_codegen = { version = "0.3", optional = true } serde_json = "1.0" [build-dependencies] -askama = { path = "../askama", version = "*", features = ["with-actix-web", "with-iron", "serde-json"] } +askama = { path = "../askama", version = "*", features = ["with-iron", "serde-json"] } [[bench]] name = "all" diff --git a/testing/tests/actix_web.rs b/testing/tests/actix_web.rs index 12724d9..e2d8bcf 100644 --- a/testing/tests/actix_web.rs +++ b/testing/tests/actix_web.rs @@ -1,3 +1,4 @@ +#![cfg(feature = "actix")] #[macro_use] extern crate askama; extern crate actix_web; diff --git a/testing/tests/rocket.rs b/testing/tests/rocket.rs index c613311..2bf4713 100644 --- a/testing/tests/rocket.rs +++ b/testing/tests/rocket.rs @@ -1,4 +1,4 @@ -#![cfg(feature = "rocket")] +#![cfg(feature = "with-rocket")] #![feature(plugin)] #![plugin(rocket_codegen)] |