remove more lifetimes
This commit is contained in:
1 parent
3ad16ddd37
commit
f42ef3ef9d
18 files changed
+241
-421
No files matched your search
@@ -133,12 +133,12 @@ impl<T: std::fmt::Debug> std::fmt::Debug for Event<T> {
|
||||
/// }
|
||||
///
|
||||
/// ```
|
||||
pub struct EventHandler<'bump, T = ()> {
|
||||
pub struct EventHandler<T = ()> {
|
||||
pub(crate) origin: ScopeId,
|
||||
pub(super) callback: RefCell<Option<ExternalListenerCallback<'bump, T>>>,
|
||||
pub(super) callback: RefCell<Option<ExternalListenerCallback<T>>>,
|
||||
}
|
||||
|
||||
impl<T> Default for EventHandler<'_, T> {
|
||||
impl<T> Default for EventHandler<T> {
|
||||
fn default() -> Self {
|
||||
Self {
|
||||
origin: ScopeId::ROOT,
|
||||
@@ -147,9 +147,9 @@ impl<T> Default for EventHandler<'_, T> {
|
||||
}
|
||||
}
|
||||
|
||||
type ExternalListenerCallback<'bump, T> = Box<dyn FnMut(T)>;
|
||||
type ExternalListenerCallback<T> = Box<dyn FnMut(T)>;
|
||||
|
||||
impl<T> EventHandler<'_, T> {
|
||||
impl<T> EventHandler< T> {
|
||||
/// Call this event handler with the appropriate event type
|
||||
///
|
||||
/// This borrows the event using a RefCell. Recursively calling a listener will cause a panic.
|
||||
|
||||
Reference in new issue
Block a user