-
Notifications
You must be signed in to change notification settings - Fork 933
unstable_features without CFG_RELEASE_CHANNEL #2249
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the PR!
src/config.rs
Outdated
() => { | ||
option_env!("CFG_RELEASE_CHANNEL") | ||
.map(|c| c == "nightly") | ||
.map(|c| c != "nightly") | ||
.unwrap_or(false) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be clearer, I think, to change this to unwrap_or(false)
and leave the macro name and usage the same - we are still checking for nightly afterall.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I assume you meant unwrap_or(true)
. Swapped back to this bool direction and tweaked the comment to still apply.
I going to toss my 2 cents in here and recommend that unstable features be hidden behind a cargo feature flag, rather than a compile time/runtime check for an environment variable. If this is something we can get a consensus on, I can work on getting that done. I just submitted a PR changing the behavior to a runtime check, without knowing this PR was open. If this PR gets merged, you can close #2259. |
Per discussion in #2228 #2228 (comment) #2228 (comment) Inline comment should explain the reasoning.
Thanks @CAD97 ! |
Per discussion in #2228
#2228 (comment)
#2228 (comment)
Inline comment should explain the reasoning.
Open to bikeshed.