An alternate workaround is to use a ref mut
pattern. This compiles with the latest stable compiler:
fn last(&mut self) -> &mut Self {
if let Some(ref mut next) = self.next {
return next.last();
}
self
}
An alternate workaround is to use a ref mut
pattern. This compiles with the latest stable compiler:
fn last(&mut self) -> &mut Self {
if let Some(ref mut next) = self.next {
return next.last();
}
self
}