mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
Remove the need for cfg_aliases in winit-core (#4271)
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user