mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-31 13:50:05 -04:00
Reduce the use of custom cfgs in examples
The `x11_platform`/`wayland_platform` cfgs remain (those are a lot more involved, so it might still makes sense to use them for clarity).
This commit is contained in:
@@ -12,11 +12,11 @@ use std::collections::HashMap;
|
||||
use std::mem;
|
||||
use std::mem::ManuallyDrop;
|
||||
use std::num::NonZeroU32;
|
||||
#[cfg(not(web_platform))]
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
use std::time::Instant;
|
||||
|
||||
use softbuffer::{Context, Surface};
|
||||
#[cfg(web_platform)]
|
||||
#[cfg(target_family = "wasm")]
|
||||
use web_time::Instant;
|
||||
use winit::window::{Window, WindowId};
|
||||
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#[cfg(not(web_platform))]
|
||||
#[cfg(not(target_family = "wasm"))]
|
||||
pub fn init() {
|
||||
use tracing_subscriber::filter::{EnvFilter, LevelFilter};
|
||||
|
||||
@@ -9,7 +9,7 @@ pub fn init() {
|
||||
.init();
|
||||
}
|
||||
|
||||
#[cfg(web_platform)]
|
||||
#[cfg(target_family = "wasm")]
|
||||
pub fn init() {
|
||||
use tracing_subscriber::layer::SubscriberExt;
|
||||
use tracing_subscriber::util::SubscriberInitExt;
|
||||
|
||||
Reference in New Issue
Block a user