浏览代码

fix some more clippy lints

Evan Almloff 1 年之前
父节点
当前提交
8af39e0f1e
共有 3 个文件被更改,包括 3 次插入8 次删除
  1. 2 0
      packages/core/src/diff/mod.rs
  2. 0 6
      packages/core/src/diff/node.rs
  3. 1 2
      packages/core/src/virtual_dom.rs

+ 2 - 0
packages/core/src/diff/mod.rs

@@ -1,3 +1,5 @@
+#![allow(clippy::too_many_arguments)]
+
 use crate::{
     arena::ElementId,
     innerlude::{ElementRef, VNodeMount, WriteMutations},

+ 0 - 6
packages/core/src/diff/node.rs

@@ -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
packages/core/src/virtual_dom.rs

@@ -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);
     }