/// Remove an element by its iterator.
Remove an element by its iterator.
Remove an element by its iterator .
pub unsafe fn remove(&mut self, node: &mut Node<T>) {
        if let Some(ptr) = self.first {
            if *ptr as *const _ == node as *const _ {
                self.first = node.next;
            }
        }
        if let Some(prev) = node.prev {
            (**prev).next = node.next;
        }
        if let Some(next) = node.next {
            (**next).prev = node.prev;
        }
        node.next = None;
        node.prev = None;
    }
pub unsafe fn remove ( & mut self , node : & mut Node < T > ) { if let Some ( ptr ) = self . first { if * ptr as * const _ == node as * const _ { self . first = node . next ; } } if let Some ( prev ) = node . prev { ( * * prev ) . next = node . next ; } if let Some ( next ) = node . next { ( * * next ) . prev = node . prev ; } node . next = None ; node . prev = None ; }
Remove an element by its iterator.
Remove an element by its iterator .
&mut self
node
&mut Node<T>