Make env_logger an optional dependency

Only used during development no need to pull in its set of features when
typically compiled as a dependency of other crates!

Closes #1580
This commit is contained in:
Alex Crichton
2019-06-10 07:12:44 -07:00
parent 2e05b62013
commit 5cf8224d99
2 changed files with 2 additions and 1 deletions

View File

@ -20,7 +20,7 @@ doctest = false
test = false test = false
[build-dependencies] [build-dependencies]
env_logger = "0.6.0" env_logger = { version = "0.6.0", optional = true }
failure = "0.1.2" failure = "0.1.2"
wasm-bindgen-webidl = { path = "../webidl", version = "=0.2.45" } wasm-bindgen-webidl = { path = "../webidl", version = "=0.2.45" }
sourcefile = "0.1" sourcefile = "0.1"

View File

@ -8,6 +8,7 @@ use std::path::{self, PathBuf};
use std::process::{self, Command}; use std::process::{self, Command};
fn main() { fn main() {
#[cfg(feature = "env_logger")]
env_logger::init(); env_logger::init();
if let Err(e) = try_main() { if let Err(e) = try_main() {