pub(crate) fn remove_node(node_id: &NodeId) {
        ACTIVE_NETWORK.with(|active_network| {
            if let Some(active_network) = active_network.borrow_mut().as_mut() {
                active_network
                    .downcast_mut::<Self>()
                    .expect("active network has wrong message type")
                    .nodes
                    .write()
                    .expect("poisoned lock")
                    .remove(node_id)
                    .expect("node doesn't exist in network");
            }
        })
    }
/// Removes an in-memory network component on the active network.
///
/// # Panics
///
/// Panics if the internal lock has been poisoned, the active network is not of the correct
/// message type, or the node to remove doesn't exist.
Removes an in-memory network component on the active network.
Removes an in - memory network component on the active network .
pub(crate) fn remove_node(node_id: &NodeId) {
        ACTIVE_NETWORK.with(|active_network| {
            if let Some(active_network) = active_network.borrow_mut().as_mut() {
                active_network
                    .downcast_mut::<Self>()
                    .expect("active network has wrong message type")
                    .nodes
                    .write()
                    .expect("poisoned lock")
                    .remove(node_id)
                    .expect("node doesn't exist in network");
            }
        })
    }
pub ( crate ) fn remove_node ( node_id : & NodeId ) { ACTIVE_NETWORK . with ( | active_network | { if let Some ( active_network ) = active_network . borrow_mut ( ) . as_mut ( ) { active_network . downcast_mut :: < Self > ( ) . expect ( " " ) . nodes . write ( ) . expect ( " " ) . remove ( node_id ) . expect ( " " ) ; } } ) }
Removes an in-memory network component on the active network.
Removes an in - memory network component on the active network .
node_id
&NodeId
node_id
&NodeId
panics
Panics if the internal lock has been poisoned, the active network is not of the correct
message type, or the node to remove doesn't exist.
Panics if the internal lock has been poisoned the active network is not of the correct message type or the node to remove doesn ' t exist .