X-Git-Url: https://git.ralfj.de/rust-101.git/blobdiff_plain/a2eeb1b93e8f52b2119fb11d56f5ffc764ac747b..e7d7a4a73b044faa7f3959b9c48e1919bef0d54e:/solutions/src/list.rs?ds=sidebyside diff --git a/solutions/src/list.rs b/solutions/src/list.rs index 180627d..3206982 100644 --- a/solutions/src/list.rs +++ b/solutions/src/list.rs @@ -1,4 +1,3 @@ - use std::ptr; use std::mem; use std::marker::PhantomData; @@ -102,7 +101,7 @@ impl LinkedList { } } - pub fn iter_mut(&self) -> IterMut { + pub fn iter_mut(&mut self) -> IterMut { IterMut { next: self.first, _marker: PhantomData } } }