1
Fork 0

Rollup merge of #118993 - jyn514:cfg-color, r=WaffleLapkin,Nilstrieb

use `if cfg!` instead of `#[cfg]`

this pr is specifically for waffle because i love it <3

fixes https://github.com/rust-lang/rust/pull/118756#discussion_r1421767649

r? `@WaffleLapkin`
This commit is contained in:
Jubilee 2023-12-15 21:32:59 -08:00 committed by GitHub
commit 30231d9afa
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -2677,10 +2677,7 @@ fn from_stderr(color: ColorConfig) -> Destination {
/// On Windows, BRIGHT_BLUE is hard to read on black. Use cyan instead.
///
/// See #36178.
#[cfg(windows)]
const BRIGHT_BLUE: Color = Color::Cyan;
#[cfg(not(windows))]
const BRIGHT_BLUE: Color = Color::Blue;
const BRIGHT_BLUE: Color = if cfg!(windows) { Color::Cyan } else { Color::Blue };
impl Style {
fn color_spec(&self, lvl: Level) -> ColorSpec {