Skip to content

Commit

Permalink
lint: fixed wasm lints
Browse files Browse the repository at this point in the history
  • Loading branch information
lukexor committed Aug 15, 2024
1 parent 11fe6ba commit 8f5cb98
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion tetanes/src/sys/logging/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ pub fn init_impl<S>(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"));
Expand Down
2 changes: 1 addition & 1 deletion tetanes/src/sys/platform/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 8f5cb98

Please sign in to comment.