From 66cec916d758e6a1b5d107b0f6e949b06613a468 Mon Sep 17 00:00:00 2001 From: Adrian Taylor Date: Fri, 12 Jan 2024 14:08:46 +0000 Subject: [PATCH] Fix ambiguous lifetimes. (#16) * Fix ambiguous lifetimes. These types of ambiguous lifetimes may shortly be forbidden by https://github.com/rust-lang/rust/pull/117967 Co-authored-by: Daniel Henry-Mantilla --- src/lending_iterator/constructors/windows_mut_.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/lending_iterator/constructors/windows_mut_.rs b/src/lending_iterator/constructors/windows_mut_.rs index 8a1cfa4..49f6a32 100644 --- a/src/lending_iterator/constructors/windows_mut_.rs +++ b/src/lending_iterator/constructors/windows_mut_.rs @@ -50,18 +50,18 @@ for &'next mut [T; WINDOW_SIZE] ; - fn next ( - self: &'_ mut WindowsMut<&'lt mut [T], WINDOW_SIZE>, - ) -> Option<&'_ mut [T; WINDOW_SIZE]> + fn next<'next> ( + self: &'next mut WindowsMut<&'lt mut [T], WINDOW_SIZE>, + ) -> Option<&'next mut [T; WINDOW_SIZE]> { self.nth(0) } #[inline] - fn nth ( - self: &'_ mut WindowsMut<&'lt mut [T], WINDOW_SIZE>, + fn nth<'nth> ( + self: &'nth mut WindowsMut<&'lt mut [T], WINDOW_SIZE>, n: usize, - ) -> Option<&'_ mut [T; WINDOW_SIZE]> + ) -> Option<&'nth mut [T; WINDOW_SIZE]> { let new_start = self.start.checked_add(n)?; let slice =