chore: continue to clean things up
This commit is contained in:
1 parent
85657d3906
commit
11a45c8ef0
5 files changed
+23
-50
No files matched your search
@@ -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> {
|
||||
|
||||
Reference in new issue
Block a user