Feat: ensure mutabality is okay when not double-using the components

This commit is contained in:
Jonathan Kelley committed 2021-03-12 16:58:30 -05:00
1 parent b3c96a5996
commit 305ff919ef
13 files changed
+120 -114

No files matched your search

+2
View File
@@ -58,6 +58,7 @@ use std::{
/// that were modified by the eventtrigger. This prevents doubly evaluating components if they were both updated via
/// subscriptions and props changes.
pub struct DiffMachine<'a> {
pub create_diffs: bool,
pub change_list: EditMachine<'a>,
pub diffed: FxHashSet<ScopeIdx>,
pub lifecycle_events: VecDeque<LifeCycleEvent<'a>>,
@@ -75,6 +76,7 @@ pub enum LifeCycleEvent<'a> {
impl<'a> DiffMachine<'a> {
pub fn new() -> Self {
Self {
create_diffs: true,
lifecycle_events: VecDeque::new(),
change_list: EditMachine::new(),
diffed: FxHashSet::default(),