Mark the Iterator last self parameter as mut

This commit is contained in:
Clément Renault 2020-12-10 11:58:52 +01:00
parent 6a5a60048d
commit 5190fe4979
No known key found for this signature in database
GPG Key ID: 92ADA4E935E71FA4

View File

@ -3020,7 +3020,7 @@ where P: FnMut(&T, &T) -> bool,
}
#[inline]
fn last(self) -> Option<Self::Item> {
fn last(mut self) -> Option<Self::Item> {
self.next_back()
}
}
@ -3105,7 +3105,7 @@ where P: FnMut(&T, &T) -> bool,
}
#[inline]
fn last(self) -> Option<Self::Item> {
fn last(mut self) -> Option<Self::Item> {
self.next_back()
}
}