mirror of
https://github.com/rust-windowing/winit.git
synced 2026-09-01 14:20:05 -04:00
Use cfg aliases throught the code base
Co-authored-by: Mads Marquart <mads@marquart.dk>
This commit is contained in:
@@ -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.");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user