From 8f5cb98afda66c5b517f3cd7bebed84336ced0a9 Mon Sep 17 00:00:00 2001 From: Luke Date: Thu, 15 Aug 2024 12:41:53 -0700 Subject: [PATCH] lint: fixed wasm lints --- tetanes/src/sys/logging/wasm.rs | 2 +- tetanes/src/sys/platform/wasm.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tetanes/src/sys/logging/wasm.rs b/tetanes/src/sys/logging/wasm.rs index fb13310a..1fd6b369 100644 --- a/tetanes/src/sys/logging/wasm.rs +++ b/tetanes/src/sys/logging/wasm.rs @@ -13,7 +13,7 @@ pub fn init_impl(registry: S) -> anyhow::Result<(impl SubscriberInitExt, Log) where S: SubscriberExt + for<'a> LookupSpan<'a> + Sync + Send, { - panic::set_hook(Box::new(|info: &panic::PanicInfo<'_>| { + panic::set_hook(Box::new(|info: &panic::PanicHookInfo<'_>| { let error_div = web_sys::window() .and_then(|window| window.document()) .and_then(|document| document.get_element_by_id("error")); diff --git a/tetanes/src/sys/platform/wasm.rs b/tetanes/src/sys/platform/wasm.rs index 43a8f5ef..828258e2 100644 --- a/tetanes/src/sys/platform/wasm.rs +++ b/tetanes/src/sys/platform/wasm.rs @@ -375,7 +375,7 @@ pub mod renderer { tracing::warn!("Copied text: {copied_text}"); if !copied_text.is_empty() { if let Some(clipboard) = - web_sys::window().and_then(|window| window.navigator().clipboard()) + web_sys::window().map(|window| window.navigator().clipboard()) { let promise = clipboard.write_text(&copied_text); let future = JsFuture::from(promise);