From 593a5c40a4c8c255ca15969d9ba15760cbc86391 Mon Sep 17 00:00:00 2001 From: Ingvar Stepanyan Date: Tue, 31 Jul 2018 11:53:22 +0100 Subject: [PATCH] Use is_nightly helper instead of duplicate code --- src/bin/main.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/bin/main.rs b/src/bin/main.rs index 96237d533a29..e5f5b625ebae 100644 --- a/src/bin/main.rs +++ b/src/bin/main.rs @@ -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");