X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/1a691352b57b7338388ff568403495ecb44272eb..67c07b22fc19f6e39b41bdd5c95b02643f51e81b:/workspace/src/part16.rs 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...