fn drop(&mut self) {
        let mut cur_ptr = self.first;
        while !cur_ptr.is_null() {
            // In the destructor, we just iterate over the entire list, successively obtaining ownership
            // (`Box`) of every node. When the box is dropped, it will call the destructor on `data` if
            // necessary, and subsequently free the node on the heap.
            let cur = unsafe { raw_into_box(cur_ptr) };
            cur_ptr = cur.next;
            drop(cur);
        }
    }
// The destructor itself is a method which takes `self` in mutably borrowed form. It cannot own `self`, because then
// the destructor of `self` would be called at the end of the function, resulting in endless recursion.
The destructor itself is a method which takes `self` in mutably borrowed form. It cannot own `self`, because then
the destructor of `self` would be called at the end of the function, resulting in endless recursion.
The destructor itself is a method which takes ` self ` in mutably borrowed form . It cannot own ` self ` because then the destructor of ` self ` would be called at the end of the function resulting in endless recursion .
fn drop(&mut self) {
        let mut cur_ptr = self.first;
        while !cur_ptr.is_null() {
            // In the destructor, we just iterate over the entire list, successively obtaining ownership
            // (`Box`) of every node. When the box is dropped, it will call the destructor on `data` if
            // necessary, and subsequently free the node on the heap.
            let cur = unsafe { raw_into_box(cur_ptr) };
            cur_ptr = cur.next;
            drop(cur);
        }
    }
fn drop ( & mut self ) { let mut cur_ptr = self . first ; while ! cur_ptr . is_null ( ) { // In the destructor, we just iterate over the entire list, successively obtaining ownership // (`Box`) of every node. When the box is dropped, it will call the destructor on `data` if // necessary, and subsequently free the node on the heap. let cur = unsafe { raw_into_box ( cur_ptr ) } ; cur_ptr = cur . next ; drop ( cur ) ; } }
The destructor itself is a method which takes `self` in mutably borrowed form.
The destructor itself is a method which takes ` self ` in mutably borrowed form .
&mut self
&mut self