Merge pull request #2235 from topecongiro/option_env

Inspect CFG_RELEASE_CHANNEL env var at compile time
This commit is contained in:
Nick Cameron 2017-12-04 17:24:39 +13:00 committed by GitHub
commit 77524632f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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)
}
}