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> {
|
||||
|
||||
@@ -489,8 +489,7 @@ impl VirtualDom {
|
||||
match unsafe { self.run_scope(ScopeId(0)).extend_lifetime_ref() } {
|
||||
// Rebuilding implies we append the created elements to the root
|
||||
RenderReturn::Sync(Ok(node)) => {
|
||||
let m = self.create_scope(ScopeId(0), node);
|
||||
// self.mutations.push(Mutation::AppendChildren { m });
|
||||
let _m = self.create_scope(ScopeId(0), node);
|
||||
}
|
||||
// If an error occurs, we should try to render the default error component and context where the error occured
|
||||
RenderReturn::Sync(Err(e)) => panic!("Cannot catch errors during rebuild {:?}", e),
|
||||
|
||||
Reference in new issue
Block a user