Use is_nightly helper instead of duplicate code

This commit is contained in:
Ingvar Stepanyan 2018-07-31 11:53:22 +01:00
parent c25deef110
commit 593a5c40a4

View file

@ -456,9 +456,7 @@ impl GetOptsOptions {
return Err(format_err!("Can't use both `--verbose` and `--quiet`"));
}
let rust_nightly = option_env!("CFG_RELEASE_CHANNEL")
.map(|c| c == "nightly")
.unwrap_or(false);
let rust_nightly = is_nightly();
if rust_nightly {
options.unstable_features = matches.opt_present("unstable-features");