Skip to content

Commit 5190fe4

Browse files
committed
Mark the Iterator last self parameter as mut
1 parent 6a5a600 commit 5190fe4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

library/core/src/slice/iter.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3020,7 +3020,7 @@ where P: FnMut(&T, &T) -> bool,
30203020
}
30213021

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

31073107
#[inline]
3108-
fn last(self) -> Option<Self::Item> {
3108+
fn last(mut self) -> Option<Self::Item> {
31093109
self.next_back()
31103110
}
31113111
}

0 commit comments

Comments
 (0)