(timer_id: TimerId)
| 25 | } |
| 26 | |
| 27 | pub fn clear_timer(timer_id: TimerId) { |
| 28 | TIMERS.with(|timers| { |
| 29 | let mut timers = timers.borrow_mut(); |
| 30 | if let Some(index) = timers.iter().position(|(id, _)| *id == timer_id) { |
| 31 | let _ = timers.remove(index); |
| 32 | } |
| 33 | }) |
| 34 | } |
| 35 | } |
no test coverage detected