Remove cx in more places
This commit is contained in:
10 files changed
+122
-127
No files matched your search
@@ -74,7 +74,7 @@ pub(crate) mod innerlude {
|
||||
pub use crate::innerlude::{
|
||||
fc_to_builder, generation, once, schedule_update, schedule_update_any, vdom_is_rendering,
|
||||
AnyValue, Attribute, AttributeValue, CapturedError, Component, DynamicNode, Element, ElementId,
|
||||
Event, Fragment, IntoDynNode, Mutation, MutationsVec, NoOpMutations, Properties, RenderReturn,
|
||||
Event, Fragment, IntoDynNode, Mutation, Mutations, NoOpMutations, Properties, RenderReturn,
|
||||
ScopeId, Task, Template, TemplateAttribute, TemplateNode, VComponent, VNode, VNodeInner,
|
||||
VPlaceholder, VText, VirtualDom, WriteMutations,
|
||||
};
|
||||
|
||||
@@ -327,7 +327,7 @@ pub enum Mutation {
|
||||
|
||||
/// A static list of mutations that can be applied to the DOM. Note: this list does not contain any `Any` attribute values
|
||||
#[derive(Debug, PartialEq, Default)]
|
||||
pub struct MutationsVec {
|
||||
pub struct Mutations {
|
||||
/// The list of Scopes that were diffed, created, and removed during the Diff process.
|
||||
pub dirty_scopes: FxHashSet<ScopeId>,
|
||||
|
||||
@@ -340,7 +340,7 @@ pub struct MutationsVec {
|
||||
pub edits: Vec<Mutation>,
|
||||
}
|
||||
|
||||
impl MutationsVec {
|
||||
impl Mutations {
|
||||
/// Rewrites IDs to just be "template", so you can compare the mutations
|
||||
///
|
||||
/// Used really only for testing
|
||||
@@ -355,7 +355,7 @@ impl MutationsVec {
|
||||
}
|
||||
}
|
||||
|
||||
impl WriteMutations for MutationsVec {
|
||||
impl WriteMutations for Mutations {
|
||||
fn register_template(&mut self, template: Template) {
|
||||
self.templates.push(template)
|
||||
}
|
||||
|
||||
@@ -13,7 +13,7 @@ use crate::{
|
||||
nodes::{Template, TemplateId},
|
||||
runtime::{Runtime, RuntimeGuard},
|
||||
scopes::ScopeId,
|
||||
AttributeValue, Element, Event, MutationsVec,
|
||||
AttributeValue, Element, Event, Mutations,
|
||||
};
|
||||
use futures_util::{pin_mut, StreamExt};
|
||||
use rustc_hash::{FxHashMap, FxHashSet};
|
||||
@@ -565,8 +565,8 @@ impl VirtualDom {
|
||||
}
|
||||
|
||||
/// [`VirtualDom::rebuild`] to a vector of mutations for testing purposes
|
||||
pub fn rebuild_to_vec(&mut self) -> MutationsVec {
|
||||
let mut mutations = MutationsVec::default();
|
||||
pub fn rebuild_to_vec(&mut self) -> Mutations {
|
||||
let mut mutations = Mutations::default();
|
||||
self.rebuild(&mut mutations);
|
||||
mutations
|
||||
}
|
||||
@@ -591,8 +591,8 @@ impl VirtualDom {
|
||||
}
|
||||
|
||||
/// [`Self::render_immediate`] to a vector of mutations for testing purposes
|
||||
pub fn render_immediate_to_vec(&mut self) -> MutationsVec {
|
||||
let mut mutations = MutationsVec::default();
|
||||
pub fn render_immediate_to_vec(&mut self) -> Mutations {
|
||||
let mut mutations = Mutations::default();
|
||||
self.render_immediate(&mut mutations);
|
||||
mutations
|
||||
}
|
||||
@@ -665,8 +665,8 @@ impl VirtualDom {
|
||||
pub async fn render_with_deadline_to_vec(
|
||||
&mut self,
|
||||
deadline: impl Future<Output = ()>,
|
||||
) -> MutationsVec {
|
||||
let mut mutations = MutationsVec::default();
|
||||
) -> Mutations {
|
||||
let mut mutations = Mutations::default();
|
||||
self.render_with_deadline(deadline, &mut mutations).await;
|
||||
mutations
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user