about summary refs log tree commit diff
diff options
context:
space:
mode:
authorClément Renault <clement@meilisearch.com>2020-12-10 11:58:52 +0100
committerClément Renault <clement@meilisearch.com>2020-12-10 11:58:52 +0100
commit5190fe4979f90b2912aed5a2cf9b77e3dcfb1a9d (patch)
tree5e46e455e5995b5c61d023ee61b571a1c6396be5
parent6a5a60048d98e0d0c545703ff5a9ba39beef49a7 (diff)
downloadrust-5190fe4979f90b2912aed5a2cf9b77e3dcfb1a9d.tar.gz
rust-5190fe4979f90b2912aed5a2cf9b77e3dcfb1a9d.zip
Mark the Iterator last self parameter as mut
-rw-r--r--library/core/src/slice/iter.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/library/core/src/slice/iter.rs b/library/core/src/slice/iter.rs
index 9053376bdf2..71106c66f12 100644
--- a/library/core/src/slice/iter.rs
+++ b/library/core/src/slice/iter.rs
@@ -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()
     }
 }