Fixed compile errors

This commit is contained in:
Maccesch 2024-01-16 10:24:49 +00:00
parent 752cf1f832
commit 37f4a928c9
2 changed files with 8 additions and 2 deletions

View file

@ -398,6 +398,8 @@ macro_rules! impl_from_strings_inner {
let _ = sel;
None
} else {
use wasm_bindgen::JsCast;
if let Ok(node_list) = document().query_selector_all(sel) {
let mut list = Vec::with_capacity(node_list.length() as usize);
for i in 0..node_list.length() {

View file

@ -34,8 +34,12 @@ where
}
};
on_cleanup(move || {
clear_timeout(&timer);
on_cleanup({
let timer = Rc::clone(&timer);
move || {
clear_timeout(&timer);
}
});
let ms = ms.into();