Skip to content

Commit 95b4124

Browse files
committed
Provide better error message when running example without features
Even better would be if "cargo run --example server" would automatically enable those features, but Cargo can't do that right now.
1 parent 032b03a commit 95b4124

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

Cargo.toml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ name = "bench"
1515
harness = false
1616
path = "benches/bench.rs"
1717

18+
[[example]]
19+
name = "server"
20+
required-features = ["iron-handlers", "expose-test-schema"]
21+
1822
[features]
1923
default = ["rustc-serialize"]
2024
nightly = []

examples/server.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ extern crate iron;
22
extern crate mount;
33
extern crate logger;
44
extern crate rustc_serialize;
5-
#[macro_use] extern crate juniper;
5+
extern crate juniper;
66

77
use std::env;
88

0 commit comments

Comments
 (0)