Skip to content

Commit

Permalink
Fix ambiguous lifetimes. (#16)
Browse files Browse the repository at this point in the history
* Fix ambiguous lifetimes.

These types of ambiguous lifetimes may shortly be forbidden by
rust-lang/rust#117967

Co-authored-by: Daniel Henry-Mantilla <daniel.henry.mantilla@gmail.com>
  • Loading branch information
adetaylor and danielhenrymantilla authored Jan 12, 2024
1 parent 5353b5e commit 66cec91
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/lending_iterator/constructors/windows_mut_.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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 =
Expand Down

0 comments on commit 66cec91

Please sign in to comment.