mirror of
https://github.com/rust-windowing/winit.git
synced 2026-08-29 04:40:04 -04:00
examples: Always use tracing helper module
This commit is contained in:
@@ -16,6 +16,8 @@ fn main() -> std::process::ExitCode {
|
|||||||
|
|
||||||
#[path = "util/fill.rs"]
|
#[path = "util/fill.rs"]
|
||||||
mod fill;
|
mod fill;
|
||||||
|
#[path = "util/tracing.rs"]
|
||||||
|
mod tracing;
|
||||||
|
|
||||||
#[derive(Default, Debug)]
|
#[derive(Default, Debug)]
|
||||||
struct PumpDemo {
|
struct PumpDemo {
|
||||||
@@ -52,7 +54,7 @@ fn main() -> std::process::ExitCode {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tracing_subscriber::fmt::init();
|
tracing::init();
|
||||||
|
|
||||||
let mut event_loop = EventLoop::new().unwrap();
|
let mut event_loop = EventLoop::new().unwrap();
|
||||||
|
|
||||||
|
|||||||
@@ -14,6 +14,8 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
|
|
||||||
#[path = "util/fill.rs"]
|
#[path = "util/fill.rs"]
|
||||||
mod fill;
|
mod fill;
|
||||||
|
#[path = "util/tracing.rs"]
|
||||||
|
mod tracing;
|
||||||
|
|
||||||
#[derive(Default, Debug)]
|
#[derive(Default, Debug)]
|
||||||
struct App {
|
struct App {
|
||||||
@@ -70,7 +72,7 @@ fn main() -> Result<(), Box<dyn std::error::Error>> {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
tracing_subscriber::fmt::init();
|
tracing::init();
|
||||||
|
|
||||||
let mut event_loop = EventLoop::new().unwrap();
|
let mut event_loop = EventLoop::new().unwrap();
|
||||||
|
|
||||||
|
|||||||
@@ -11,6 +11,8 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
|
|
||||||
#[path = "util/fill.rs"]
|
#[path = "util/fill.rs"]
|
||||||
mod fill;
|
mod fill;
|
||||||
|
#[path = "util/tracing.rs"]
|
||||||
|
mod tracing;
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct XEmbedDemo {
|
pub struct XEmbedDemo {
|
||||||
@@ -58,7 +60,7 @@ fn main() -> Result<(), Box<dyn Error>> {
|
|||||||
.ok_or("Expected a 32-bit X11 window ID as the first argument.")?
|
.ok_or("Expected a 32-bit X11 window ID as the first argument.")?
|
||||||
.parse::<u32>()?;
|
.parse::<u32>()?;
|
||||||
|
|
||||||
tracing_subscriber::fmt::init();
|
tracing::init();
|
||||||
let event_loop = EventLoop::new()?;
|
let event_loop = EventLoop::new()?;
|
||||||
|
|
||||||
Ok(event_loop.run_app(XEmbedDemo { parent_window_id, window: None })?)
|
Ok(event_loop.run_app(XEmbedDemo { parent_window_id, window: None })?)
|
||||||
|
|||||||
Reference in New Issue
Block a user