fn orphan_child(&mut self, mc: MutationContext<'gc, '_>, child: XmlNode<'gc>) {
        if let Some(position) = self.child_position(child) {
            match &mut *self.0.write(mc) {
                XmlNodeData::DocumentRoot { children, .. }
                | XmlNodeData::Element { children, .. } => children.remove(position),
                XmlNodeData::Text { .. } => {
                    // This cannot happen, as `insert_child` refuses to adopt children into text nodes.
                    unreachable!();
                }
            };
        }
    }
/// Remove node from this node's child list.
///
/// This function yields Err if this node cannot accept child nodes.
Remove node from this node's child list.
This function yields Err if this node cannot accept child nodes.
Remove node from this node ' s child list . This function yields Err if this node cannot accept child nodes .
fn orphan_child(&mut self, mc: MutationContext<'gc, '_>, child: XmlNode<'gc>) {
        if let Some(position) = self.child_position(child) {
            match &mut *self.0.write(mc) {
                XmlNodeData::DocumentRoot { children, .. }
                | XmlNodeData::Element { children, .. } => children.remove(position),
                XmlNodeData::Text { .. } => {
                    // This cannot happen, as `insert_child` refuses to adopt children into text nodes.
                    unreachable!();
                }
            };
        }
    }
fn orphan_child ( & mut self , mc : MutationContext < ' gc , ' _ > , child : XmlNode < ' gc > ) { if let Some ( position ) = self . child_position ( child ) { match & mut * self . 0 . write ( mc ) { XmlNodeData :: DocumentRoot { children , .. } | XmlNodeData :: Element { children , .. } => children . remove ( position ) , XmlNodeData :: Text { .. } => { // This cannot happen, as `insert_child` refuses to adopt children into text nodes. unreachable ! ( ) ; } } ; } }
Remove node from this node's child list.
Remove node from this node ' s child list .
&mut self
mc
MutationContext<'gc, '_>
child
XmlNode<'gc>