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);