Fix warnings (#2076)

* examples: Fix unused `Result` that must be used when initializing console_log

* examples: Fix unused imports

* Fix unread name field warning in linux x11 ime InputMethod struct

* Fix unread name field warning in linux x11 Device struct

* Ignore unread field warning in macos/ios MonitorHandle struct

* ci: Add `--deny warnings` to `RUSTFLAGS`
This commit is contained in:
Philippe Renon 2021-12-11 03:02:48 +01:00 committed by GitHub
parent 20d012ae3f
commit 18a61f1058
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 18 additions and 15 deletions

View file

@ -1,14 +1,14 @@
use std::{thread, time};
use simple_logger::SimpleLogger;
use winit::{
event::{Event, WindowEvent},
event_loop::{ControlFlow, EventLoop},
window::WindowBuilder,
};
#[cfg(not(target_arch = "wasm32"))]
fn main() {
use std::{thread, time};
use simple_logger::SimpleLogger;
use winit::{
event::{Event, WindowEvent},
event_loop::{ControlFlow, EventLoop},
window::WindowBuilder,
};
SimpleLogger::new().init().unwrap();
let event_loop = EventLoop::new();

View file

@ -51,7 +51,7 @@ mod wasm {
#[wasm_bindgen(start)]
pub fn run() {
console_log::init_with_level(log::Level::Debug);
console_log::init_with_level(log::Level::Debug).expect("error initializing logger");
super::main();
}