make core compile

This commit is contained in:
Evan Almloff committed 2024-01-05 12:25:18 -06:00
1 parent 113b2c1529
commit 32b15fc851
9 files changed
+98 -88

No files matched your search

+1 -1
View File
@@ -310,7 +310,7 @@ impl<'src> ScopeState {
}
/// Create a new [`EventHandler`] from an [`FnMut`]
pub fn event_handler<T>(&self, f: impl FnMut(T) + 'static) -> EventHandler<T> {
pub fn event_handler<T>(&self, mut f: impl FnMut(T) + 'static) -> EventHandler<T> {
let callback = RefCell::new(Some(Box::new(move |event: T| {
f(event);
}) as Box<dyn FnMut(T)>));