Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
ivanceras committed Mar 8, 2024
1 parent 710bafa commit 18987b2
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 11 deletions.
7 changes: 0 additions & 7 deletions crates/core/src/vdom/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -282,13 +282,6 @@ fn create_attribute_patches<'a, MSG>(
let new_attributes = new_element.attributes();
let old_attributes = old_element.attributes();

/*
// skip diffing if they the same attributes
if old_attributes == new_attributes {
return vec![];
}
*/

let mut patches = vec![];

let mut add_attributes: Vec<&Attribute<MSG>> = vec![];
Expand Down
5 changes: 1 addition & 4 deletions crates/core/src/vdom/diff_lis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -265,8 +265,7 @@ fn diff_keyed_middle<'a, MSG>(
&mut starts,
);

// the lis_seuqnce came out from high to low, so we just reverse it back to arrange from low to
// high
// the list_sequence came out from high to low, so we just reverse it back to arrange from low to high
lis_sequence.reverse();

// if a new node gets u32 max and is at the end, then it might be part of our LIS (because u32 max is a valid LIS)
Expand Down Expand Up @@ -360,8 +359,6 @@ fn diff_keyed_middle<'a, MSG>(
}
}
if !node_paths.is_empty() {
// TODO: maybe we can also use after_node (left_offset - 1), or the last element of
// matched key
let first = 0;
let patch = Patch::move_before_node(
old_children[left_offset + first].tag(),
Expand Down

0 comments on commit 18987b2

Please sign in to comment.