(fix): rust errors
All checks were successful
CI / checks (push) Successful in 6m2s

This commit is contained in:
Alois 2026-07-04 14:22:05 +02:00
commit c7a57a851e

View file

@ -76,12 +76,16 @@ fn route_incoming_frame(
let Some(message_type) = message_type else { let Some(message_type) = message_type else {
return; return;
}; };
for (_, (subscription_type, callback)) in subscriptions.borrow().iter() { let callbacks: Vec<js_sys::Function> = subscriptions
if subscription_type == &message_type { .borrow()
.iter()
.filter(|(_, (t, _))| t == &message_type)
.map(|(_, (_, cb))| cb.clone())
.collect();
for callback in callbacks {
let _ = callback.call1(&JsValue::NULL, frame); let _ = callback.call1(&JsValue::NULL, frame);
} }
} }
}
fn stop_ping_timer(ping_timer: &Rc<RefCell<Option<PingTimer>>>) { fn stop_ping_timer(ping_timer: &Rc<RefCell<Option<PingTimer>>>) {
let Some(timer) = ping_timer.borrow_mut().take() else { let Some(timer) = ping_timer.borrow_mut().take() else {