fix some more clippy lints

This commit is contained in:
Evan Almloff committed 2024-01-09 10:11:31 -06:00
1 parent eb602fc29f
commit 8af39e0f1e
3 files changed
+3 -8

No files matched your search

+2
View File
@@ -1,3 +1,5 @@
#![allow(clippy::too_many_arguments)]
use crate::{
arena::ElementId,
innerlude::{ElementRef, VNodeMount, WriteMutations},
-6
View File
@@ -864,12 +864,6 @@ impl VNode {
}
impl VNodeMount {
fn mount_attribute(&mut self, attribute_index: usize, dom: &mut VirtualDom) -> ElementId {
let id = dom.next_element();
self.mounted_attributes[attribute_index] = id;
id
}
fn mount_node(&mut self, node_index: usize, dom: &mut VirtualDom) -> ElementId {
let id = dom.next_element();
self.mounted_dynamic_nodes[node_index] = id.0;
+1 -2
View File
@@ -552,10 +552,9 @@ impl VirtualDom {
let _runtime = RuntimeGuard::new(self.runtime.clone());
let new_nodes = self.run_scope(ScopeId::ROOT);
self.scopes[ScopeId::ROOT.0].last_rendered_node = Some(new_nodes.clone());
let (RenderReturn::Ready(mut node) | RenderReturn::Aborted(mut node)) = new_nodes;
// Rebuilding implies we append the created elements to the root
let m = self.create_scope(to, ScopeId::ROOT, &mut node, None);
let m = self.create_scope(to, ScopeId::ROOT, &new_nodes, None);
to.append_children(ElementId(0), m);
}