1
0
Fork 0
forked from wry/wry

config: accept FnMut instead of Fn for callbacks

This commit is contained in:
Julian Orth 2024-03-06 13:44:15 +01:00
parent 37fc28c749
commit 86e582472d
5 changed files with 64 additions and 44 deletions

View file

@ -53,7 +53,7 @@ impl Timer {
}
/// Sets the function to be executed when the timer expires.
pub fn on_tick<F: Fn() + 'static>(self, f: F) {
pub fn on_tick<F: FnMut() + 'static>(self, f: F) {
get!().on_timer_tick(self, f);
}
}