chore: continue to clean things up

This commit is contained in:
Jonathan Kelley committed 2022-12-01 01:08:49 -05:00
1 parent 85657d3906
commit 11a45c8ef0
5 files changed
+23 -50

No files matched your search

+8 -1
View File
@@ -131,11 +131,18 @@ impl<T: std::fmt::Debug> std::fmt::Debug for Event<T> {
/// }
///
/// ```
#[derive(Default)]
pub struct EventHandler<'bump, T = ()> {
pub(super) callback: RefCell<Option<ExternalListenerCallback<'bump, T>>>,
}
impl<T> Default for EventHandler<'_, T> {
fn default() -> Self {
Self {
callback: Default::default(),
}
}
}
type ExternalListenerCallback<'bump, T> = bumpalo::boxed::Box<'bump, dyn FnMut(T) + 'bump>;
impl<T> EventHandler<'_, T> {