config: accept FnMut instead of Fn for callbacks
This commit is contained in:
parent
37fc28c749
commit
86e582472d
5 changed files with 64 additions and 44 deletions
|
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue