X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/1a691352b57b7338388ff568403495ecb44272eb..430c62a4f32989f1bf27967f70bbbd49f9d790fa:/workspace/src/part16.rs?ds=sidebyside diff --git a/workspace/src/part16.rs b/workspace/src/part16.rs index d0b173a..835b8b8 100644 --- a/workspace/src/part16.rs +++ b/workspace/src/part16.rs @@ -94,6 +94,7 @@ impl<'a, T> Iterator for IterMut<'a, T> { // Add testcases for both kinds of iterators. // ## `Drop` + impl Drop for LinkedList { // 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 pf the function, resulting in endless recursion...