Use cfg aliases throught the code base

Co-authored-by: Mads Marquart <mads@marquart.dk>
This commit is contained in:
Amr Bashir 2022-12-25 09:57:27 +02:00 committed by GitHub
parent 58ec458877
commit 5e77d70245
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
27 changed files with 185 additions and 227 deletions

View file

@ -1,8 +1,4 @@
#[cfg(any(
all(target_os = "linux", feature = "x11"),
target_os = "macos",
target_os = "windows"
))]
#[cfg(any(x11_platform, macos_platform, windows_platform))]
fn main() {
use std::collections::HashMap;
@ -78,11 +74,7 @@ fn main() {
})
}
#[cfg(not(any(
all(target_os = "linux", feature = "x11"),
target_os = "macos",
target_os = "windows"
)))]
#[cfg(not(any(x11_platform, macos_platform, windows_platform)))]
fn main() {
panic!("This example is supported only on x11, macOS, and Windows.");
}