1
0
mirror of https://github.com/emilk/egui.git synced 2026-09-01 22:30:03 -04:00

CI: Run cargo clippy for wasm32-unknown-unknown (#2200)

* CI: Run cargo clippy for wasm32-unknown-unknown

* wasm32 clippy fixes

* Document when AppRunner::new can fail
This commit is contained in:
Emil Ernerfeldt
2022-10-30 20:55:07 +01:00
committed by GitHub
parent 53b800502a
commit 2b1341095d
10 changed files with 39 additions and 24 deletions

View File

@@ -203,7 +203,7 @@ pub fn install_canvas_events(runner_container: &mut AppRunnerContainer) -> Resul
let closure =
move |event: web_sys::MouseEvent,
mut _runner_lock: egui::mutex::MutexGuard<AppRunner>| {
mut _runner_lock: egui::mutex::MutexGuard<'_, AppRunner>| {
event.prevent_default();
};
@@ -213,7 +213,7 @@ pub fn install_canvas_events(runner_container: &mut AppRunnerContainer) -> Resul
runner_container.add_event_listener(
&canvas,
"mousedown",
|event: web_sys::MouseEvent, mut runner_lock: egui::mutex::MutexGuard<AppRunner>| {
|event: web_sys::MouseEvent, mut runner_lock: egui::mutex::MutexGuard<'_, AppRunner>| {
if let Some(button) = button_from_mouse_event(&event) {
let pos = pos_from_mouse_event(runner_lock.canvas_id(), &event);
let modifiers = runner_lock.input.raw.modifiers;