fix: actually remove nodes in keyed_diff_middle
This commit is contained in:
1 parent
4954079212
commit
35a3eaabdf
1 file changed
+9
@@ -813,6 +813,15 @@ impl<'b> DiffState<'b> {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// remove any old children that are not shared
|
||||||
|
// todo: make this an iterator
|
||||||
|
for child in old {
|
||||||
|
let key = child.key().unwrap();
|
||||||
|
if !shared_keys.contains(&key) {
|
||||||
|
self.remove_nodes([child], true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// 4. Compute the LIS of this list
|
// 4. Compute the LIS of this list
|
||||||
let mut lis_sequence = Vec::default();
|
let mut lis_sequence = Vec::default();
|
||||||
lis_sequence.reserve(new_index_to_old_index.len());
|
lis_sequence.reserve(new_index_to_old_index.len());
|
||||||
|
|||||||
Reference in new issue
Block a user