diff --git a/leptos_dom/src/events.rs b/leptos_dom/src/events.rs index f2f4f19529..2fd47a9f1f 100644 --- a/leptos_dom/src/events.rs +++ b/leptos_dom/src/events.rs @@ -69,10 +69,7 @@ pub fn add_event_listener( } let cb = Closure::wrap(cb as Box).into_js_value(); - let key = { - let key = key.borrow(); - intern(&key) - }; + let key = intern(&*key.borrow()); _ = js_sys::Reflect::set(target, &JsValue::from_str(&key), &cb); add_delegated_event_listener(&key, event_name, options); } diff --git a/leptos_dom/src/html.rs b/leptos_dom/src/html.rs index 63941d6474..0cadfae694 100644 --- a/leptos_dom/src/html.rs +++ b/leptos_dom/src/html.rs @@ -785,7 +785,10 @@ impl HtmlElement { ); let new_classes = classes.iter().flat_map(|classes| { - classes.borrow().split_whitespace() + classes + .borrow() + .split_whitespace() + .collect::>() }); if let Some(prev_classes) = prev_classes { @@ -793,7 +796,10 @@ impl HtmlElement { new_classes.collect::>(); let mut old_classes = prev_classes.iter().flat_map(|classes| { - classes.borrow().split_whitespace() + classes + .borrow() + .split_whitespace() + .collect::>() }); // Remove old classes