From 5190fe4979f90b2912aed5a2cf9b77e3dcfb1a9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 10 Dec 2020 11:58:52 +0100 Subject: [PATCH] Mark the Iterator last self parameter as mut --- library/core/src/slice/iter.rs | 4 ++-- 1 file 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 { + fn last(mut self) -> Option { self.next_back() } } @@ -3105,7 +3105,7 @@ where P: FnMut(&T, &T) -> bool, } #[inline] - fn last(self) -> Option { + fn last(mut self) -> Option { self.next_back() } }