fn diff_non_keyed_children(&mut self, old: &'bump [VNode<'bump>], new: &'bump [VNode<'bump>]) {
        // Handled these cases in `diff_children` before calling this function.
        debug_assert!(!new.is_empty());
        debug_assert!(!old.is_empty());

        for (new, old) in new.iter().zip(old.iter()).rev() {
            self.stack.push(DiffInstruction::Diff { new, old });
        }

        use std::cmp::Ordering;
        match old.len().cmp(&new.len()) {
            Ordering::Greater => self.remove_nodes(&old[new.len()..], true),
            Ordering::Less => {
                self.stack.create_children(
                    &new[old.len()..],
                    MountType::InsertAfter {
                        other_node: old.last().unwrap(),
                    },
                );
            }
            Ordering::Equal => {
                // nothing - they're the same size
            }
        }
    }
// Diff children that are not keyed.
//
// The parent must be on the top of the change list stack when entering this
// function:
//
//     [... parent]
//
// the change list stack is in the same state when this function returns.
Diff children that are not keyed.
The parent must be on the top of the change list stack when entering this
function.



the change list stack is in the same state when this function returns.
Diff children that are not keyed . The parent must be on the top of the change list stack when entering this function . the change list stack is in the same state when this function returns .
fn diff_non_keyed_children(&mut self, old: &'bump [VNode<'bump>], new: &'bump [VNode<'bump>]) {
        // Handled these cases in `diff_children` before calling this function.
        debug_assert!(!new.is_empty());
        debug_assert!(!old.is_empty());
        for (new, old) in new.iter().zip(old.iter()).rev() {
            self.stack.push(DiffInstruction::Diff { new, old });
        }
        use std::cmp::Ordering;
        match old.len().cmp(&new.len()) {
            Ordering::Greater => self.remove_nodes(&old[new.len()..], true),
            Ordering::Less => {
                self.stack.create_children(
                    &new[old.len()..],
                    MountType::InsertAfter {
                        other_node: old.last().unwrap(),
                    },
                );
            }
            Ordering::Equal => {
                // nothing - they're the same size
            }
        }
    }
fn diff_non_keyed_children ( & mut self , old : & ' bump [ VNode < ' bump > ] , new : & ' bump [ VNode < ' bump > ] ) { // Handled these cases in `diff_children` before calling this function. debug_assert ! ( new is_empty ( ) ) ; debug_assert ! ( old is_empty ( ) ) ; for ( new , old ) in new . iter ( ) . zip ( old . iter ( ) ) . rev ( ) { self . stack . push ( DiffInstruction :: Diff { new , old } ) ; } use std :: cmp :: Ordering ; match old . len ( ) . cmp ( & new . len ( ) ) { Ordering :: Greater => self . remove_nodes ( & old [ new . len ( ) .. ] , true ) , Ordering :: Less => { self . stack . create_children ( & new [ old . len ( ) .. ] , MountType :: InsertAfter { other_node : old . last ( ) . unwrap ( ) , } , ) ; } Ordering :: Equal => { // nothing - they're the same size } } }
Diff children that are not keyed.
Diff children that are not keyed .
&mut self
old
&'bump [VNode<'bump>]
new
&'bump [VNode<'bump>]