clippy fix
This commit is contained in:
1 parent
32b15fc851
commit
efd301a878
5 files changed
+8
-8
No files matched your search
@@ -32,7 +32,7 @@ impl Clone for BoxedAnyProps {
|
|||||||
|
|
||||||
/// A trait that essentially allows VComponentProps to be used generically
|
/// A trait that essentially allows VComponentProps to be used generically
|
||||||
pub(crate) trait AnyProps {
|
pub(crate) trait AnyProps {
|
||||||
fn render<'a>(&'a self) -> RenderReturn;
|
fn render(&self) -> RenderReturn;
|
||||||
fn memoize(&self, other: &dyn Any) -> bool;
|
fn memoize(&self, other: &dyn Any) -> bool;
|
||||||
fn props(&self) -> &dyn Any;
|
fn props(&self) -> &dyn Any;
|
||||||
fn duplicate(&self) -> Box<dyn AnyProps>;
|
fn duplicate(&self) -> Box<dyn AnyProps>;
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
use crate::{
|
use crate::{
|
||||||
innerlude::DirtyScope, nodes::RenderReturn, nodes::VNode, virtual_dom::VirtualDom, DynamicNode,
|
nodes::VNode, virtual_dom::VirtualDom, DynamicNode,
|
||||||
ScopeId,
|
ScopeId,
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -60,7 +60,7 @@ impl VirtualDom {
|
|||||||
// Drop a scope and all its children
|
// Drop a scope and all its children
|
||||||
//
|
//
|
||||||
// Note: This will not remove any ids from the arena
|
// Note: This will not remove any ids from the arena
|
||||||
pub(crate) fn drop_scope(&mut self, id: ScopeId, recursive: bool) {
|
pub(crate) fn drop_scope(&mut self, _id: ScopeId, _recursive: bool) {
|
||||||
// todo: Do we need this now that we don't have a bunch of unsafe code?
|
// todo: Do we need this now that we don't have a bunch of unsafe code?
|
||||||
// self.dirty_scopes.remove(&DirtyScope {
|
// self.dirty_scopes.remove(&DirtyScope {
|
||||||
// height: self.scopes[id.0].height(),
|
// height: self.scopes[id.0].height(),
|
||||||
|
|||||||
@@ -345,7 +345,7 @@ impl VirtualDom {
|
|||||||
attribute.mounted_element.set(id);
|
attribute.mounted_element.set(id);
|
||||||
|
|
||||||
// Safety: we promise not to re-alias this text later on after committing it to the mutation
|
// Safety: we promise not to re-alias this text later on after committing it to the mutation
|
||||||
let unbounded_name: &str = &attribute.name;
|
let unbounded_name: &str = attribute.name;
|
||||||
|
|
||||||
match &attribute.value {
|
match &attribute.value {
|
||||||
AttributeValue::Listener(_) => {
|
AttributeValue::Listener(_) => {
|
||||||
@@ -564,7 +564,7 @@ impl VirtualDom {
|
|||||||
fn load_scope_from_vcomponent(
|
fn load_scope_from_vcomponent(
|
||||||
&mut self,
|
&mut self,
|
||||||
component: &VComponent,
|
component: &VComponent,
|
||||||
to: &mut impl WriteMutations,
|
_to: &mut impl WriteMutations,
|
||||||
) -> ScopeId {
|
) -> ScopeId {
|
||||||
component.scope.get().unwrap_or_else(|| {
|
component.scope.get().unwrap_or_else(|| {
|
||||||
self.new_scope(component.props.clone(), component.name)
|
self.new_scope(component.props.clone(), component.name)
|
||||||
|
|||||||
@@ -252,7 +252,7 @@ impl VirtualDom {
|
|||||||
parent: Option<&ElementRef>,
|
parent: Option<&ElementRef>,
|
||||||
to: &mut impl WriteMutations,
|
to: &mut impl WriteMutations,
|
||||||
) {
|
) {
|
||||||
let m = self.create_component_node(parent, right, to);
|
let _m = self.create_component_node(parent, right, to);
|
||||||
|
|
||||||
// TODO: Instead of *just* removing it, we can use the replace mutation
|
// TODO: Instead of *just* removing it, we can use the replace mutation
|
||||||
self.remove_component_node(left, true, to);
|
self.remove_component_node(left, true, to);
|
||||||
@@ -854,7 +854,7 @@ impl VirtualDom {
|
|||||||
"replace_nodes must have at least one node"
|
"replace_nodes must have at least one node"
|
||||||
);
|
);
|
||||||
|
|
||||||
self.remove_nodes(&nodes, to);
|
self.remove_nodes(nodes, to);
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Remove these nodes from the dom
|
/// Remove these nodes from the dom
|
||||||
|
|||||||
@@ -597,7 +597,7 @@ impl VirtualDom {
|
|||||||
|
|
||||||
self.wait_for_work().await;
|
self.wait_for_work().await;
|
||||||
|
|
||||||
_ = self.render_immediate(&mut NoOpMutations);
|
self.render_immediate(&mut NoOpMutations);;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user