pub unsafe fn insert(&mut self, node: &mut Node<T>) {
        // change links in `other`
        node.prev = None;
        node.next = self.first;

        self.first = Some(Shared::new(node));
        // note: next is already updated (former self.first)
        if let Some(second) = node.next {
            (**second).prev = self.first;
        }

        debug_assert!(match node.next { Some(shared) => *shared != node, None => true });
    }
/// insert node into the first place in list
insert node into the first place in list
insert node into the first place in list
pub unsafe fn insert(&mut self, node: &mut Node<T>) {
        // change links in `other`
        node.prev = None;
        node.next = self.first;
        self.first = Some(Shared::new(node));
        // note: next is already updated (former self.first)
        if let Some(second) = node.next {
            (**second).prev = self.first;
        }
        debug_assert!(match node.next { Some(shared) => *shared != node, None => true });
    }
pub unsafe fn insert ( & mut self , node : & mut Node < T > ) { // change links in `other` node . prev = None ; node . next = self . first ; self . first = Some ( Shared :: new ( node ) ) ; // note: next is already updated (former self.first) if let Some ( second ) = node . next { ( * * second ) . prev = self . first ; } debug_assert ! ( match node next { Some ( shared ) shared node None true } ) ; }
insert node into the first place in list
insert node into the first place in list
&mut self
node
&mut Node<T>
&mut self
node
&mut Node<T>