Inspect CFG_RELEASE_CHANNEL env var at compile time

This commit is contained in:
topecongiro 2017-12-04 11:34:27 +09:00
parent 4018873d4b
commit ef4b3d9bfa

View File

@ -24,9 +24,9 @@ use Summary;
macro_rules! is_nightly_channel {
() => {
env::var("CFG_RELEASE_CHANNEL")
.map(|c| c == "nightly")
.unwrap_or(false)
option_env!("CFG_RELEASE_CHANNEL")
.map(|c| c == "nightly")
.unwrap_or(false)
}
}