Remove the need for cfg_aliases in winit-core (#4271)

This commit is contained in:
Mads Marquart 2025-06-06 13:24:01 +02:00 committed by GitHub
parent b0f26c79ff
commit 478427b0bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 18 additions and 34 deletions

View file

@ -19,3 +19,11 @@ pub mod icon;
pub mod keyboard;
pub mod monitor;
pub mod window;
// `Instant` is not actually available on `wasm32-unknown-unknown`, the `std` implementation there
// is a stub. And `wasm32-none` doesn't even have `std`. Instead, we use `web_time::Instant`.
#[cfg(not(all(target_family = "wasm", any(target_os = "unknown", target_os = "none"))))]
pub(crate) use std::time::Instant;
#[cfg(all(target_family = "wasm", any(target_os = "unknown", target_os = "none")))]
pub(crate) use web_time::Instant;