clippy fix
This commit is contained in:
1 parent
41abffb267
commit
967c082085
3 files changed
+6
-6
No files matched your search
@@ -116,7 +116,7 @@ impl VirtualDom {
|
|||||||
//
|
//
|
||||||
// `shared_prefix_count` is the count of how many nodes at the start of
|
// `shared_prefix_count` is the count of how many nodes at the start of
|
||||||
// `new` and `old` share the same keys.
|
// `new` and `old` share the same keys.
|
||||||
let (left_offset, right_offset) = match self.diff_keyed_ends(to, old, new, parent.clone()) {
|
let (left_offset, right_offset) = match self.diff_keyed_ends(to, old, new, parent) {
|
||||||
Some(count) => count,
|
Some(count) => count,
|
||||||
None => return,
|
None => return,
|
||||||
};
|
};
|
||||||
@@ -340,7 +340,7 @@ impl VirtualDom {
|
|||||||
let new_idx = idx + last + 1;
|
let new_idx = idx + last + 1;
|
||||||
let old_index = new_index_to_old_index[new_idx];
|
let old_index = new_index_to_old_index[new_idx];
|
||||||
if old_index == u32::MAX as usize {
|
if old_index == u32::MAX as usize {
|
||||||
nodes_created += new_node.create(self, to, parent.clone());
|
nodes_created += new_node.create(self, to, parent);
|
||||||
} else {
|
} else {
|
||||||
old[old_index].diff_node(new_node, self, to);
|
old[old_index].diff_node(new_node, self, to);
|
||||||
nodes_created += new_node.push_all_real_nodes(self, to);
|
nodes_created += new_node.push_all_real_nodes(self, to);
|
||||||
@@ -363,7 +363,7 @@ impl VirtualDom {
|
|||||||
let new_idx = idx + next + 1;
|
let new_idx = idx + next + 1;
|
||||||
let old_index = new_index_to_old_index[new_idx];
|
let old_index = new_index_to_old_index[new_idx];
|
||||||
if old_index == u32::MAX as usize {
|
if old_index == u32::MAX as usize {
|
||||||
nodes_created += new_node.create(self, to, parent.clone());
|
nodes_created += new_node.create(self, to, parent);
|
||||||
} else {
|
} else {
|
||||||
old[old_index].diff_node(new_node, self, to);
|
old[old_index].diff_node(new_node, self, to);
|
||||||
nodes_created += new_node.push_all_real_nodes(self, to);
|
nodes_created += new_node.push_all_real_nodes(self, to);
|
||||||
@@ -386,7 +386,7 @@ impl VirtualDom {
|
|||||||
for (idx, new_node) in new[..first_lis].iter().enumerate() {
|
for (idx, new_node) in new[..first_lis].iter().enumerate() {
|
||||||
let old_index = new_index_to_old_index[idx];
|
let old_index = new_index_to_old_index[idx];
|
||||||
if old_index == u32::MAX as usize {
|
if old_index == u32::MAX as usize {
|
||||||
nodes_created += new_node.create(self, to, parent.clone());
|
nodes_created += new_node.create(self, to, parent);
|
||||||
} else {
|
} else {
|
||||||
old[old_index].diff_node(new_node, self, to);
|
old[old_index].diff_node(new_node, self, to);
|
||||||
nodes_created += new_node.push_all_real_nodes(self, to);
|
nodes_created += new_node.push_all_real_nodes(self, to);
|
||||||
|
|||||||
@@ -22,7 +22,7 @@ impl VirtualDom {
|
|||||||
) -> usize {
|
) -> usize {
|
||||||
nodes
|
nodes
|
||||||
.into_iter()
|
.into_iter()
|
||||||
.map(|child| child.create(self, to, parent.clone()))
|
.map(|child| child.create(self, to, parent))
|
||||||
.sum()
|
.sum()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -369,7 +369,7 @@ impl VirtualDom {
|
|||||||
| <-- no, broke early
|
| <-- no, broke early
|
||||||
*/
|
*/
|
||||||
let parent_path = match self.elements.get(element.0) {
|
let parent_path = match self.elements.get(element.0) {
|
||||||
Some(Some(el)) => el.clone(),
|
Some(Some(el)) => *el,
|
||||||
_ => return,
|
_ => return,
|
||||||
};
|
};
|
||||||
let mut parent_node = Some(parent_path);
|
let mut parent_node = Some(parent_path);
|
||||||
|
|||||||
Reference in new issue
Block a user