fn adopt_siblings(
        &mut self,
        mc: MutationContext<'gc, '_>,
        new_prev: Option<XmlNode<'gc>>,
        new_next: Option<XmlNode<'gc>>,
    ) {
        if let Some(mut prev) = new_prev {
            prev.set_next_sibling(mc, Some(*self));
        }

        if let Some(mut next) = new_next {
            next.set_prev_sibling(mc, Some(*self));
        }

        self.set_prev_sibling(mc, new_prev);
        self.set_next_sibling(mc, new_next);
    }
/// Add node to a new siblings list.
///
/// If a given sibling exists, we will also ensure this node is adopted as
/// its sibling, so as to maintain a coherent sibling list.
///
/// This is the opposite of `disown_siblings` - the former removes a
/// sibling from its current list, and this adds the sibling to a new one.
Add node to a new siblings list.
If a given sibling exists, we will also ensure this node is adopted as
its sibling, so as to maintain a coherent sibling list.

This is the opposite of `disown_siblings` - the former removes a
sibling from its current list, and this adds the sibling to a new one.
Add node to a new siblings list . If a given sibling exists we will also ensure this node is adopted as its sibling so as to maintain a coherent sibling list . This is the opposite of ` disown_siblings ` - the former removes a sibling from its current list and this adds the sibling to a new one .
fn adopt_siblings(
        &mut self,
        mc: MutationContext<'gc, '_>,
        new_prev: Option<XmlNode<'gc>>,
        new_next: Option<XmlNode<'gc>>,
    ) {
        if let Some(mut prev) = new_prev {
            prev.set_next_sibling(mc, Some(*self));
        }
        if let Some(mut next) = new_next {
            next.set_prev_sibling(mc, Some(*self));
        }
        self.set_prev_sibling(mc, new_prev);
        self.set_next_sibling(mc, new_next);
    }
fn adopt_siblings ( & mut self , mc : MutationContext < ' gc , ' _ > , new_prev : Option < XmlNode < ' gc > > , new_next : Option < XmlNode < ' gc > > , ) { if let Some ( mut prev ) = new_prev { prev . set_next_sibling ( mc , Some ( * self ) ) ; } if let Some ( mut next ) = new_next { next . set_prev_sibling ( mc , Some ( * self ) ) ; } self . set_prev_sibling ( mc , new_prev ) ; self . set_next_sibling ( mc , new_next ) ; }
Add node to a new siblings list.
Add node to a new siblings list .
&mut self
mc
MutationContext<'gc, '_>
new_prev
Option<XmlNode<'gc>>
new_next
Option<XmlNode<'gc>>