X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/7fdd4203f19f2fa9096d0a662acf22d447e57af1..174314786770835cff60100f9ea66aeec59745a4:/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...