Skip to content

Commit

Permalink
Elide unnecessary lifetimes
Browse files Browse the repository at this point in the history
Well, clippy wins
  • Loading branch information
TheVeryDarkness committed Dec 24, 2024
1 parent 1097536 commit cbd3643
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 10 deletions.
8 changes: 2 additions & 6 deletions src/read/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,7 @@ impl<'f, 's, F: Format, S: ?Sized, T: ReadOneFrom> ReadAll<'f, 's, F, S, T> {
}
}

#[expect(clippy::needless_lifetimes)]
impl<'l, 's, F: Format, S: BufReadExt + ?Sized, T: ReadOneFrom> Iterator
for ReadAll<'l, 's, F, S, T>
{
impl<F: Format, S: BufReadExt + ?Sized, T: ReadOneFrom> Iterator for ReadAll<'_, '_, F, S, T> {
type Item = Result<T, ReadOneFromError<T>>;

#[inline]
Expand Down Expand Up @@ -61,8 +58,7 @@ impl<'l, 's, L: Format, T: ReadOneFrom> ReadAllIn<'l, 's, L, T> {
}
}

#[expect(clippy::needless_lifetimes)]
impl<'l, 's, L: Format, T: ReadOneFrom> Iterator for ReadAllIn<'l, 's, L, T> {
impl<L: Format, T: ReadOneFrom> Iterator for ReadAllIn<'_, '_, L, T> {
type Item = Result<T, ReadOneFromError<T>>;

#[inline]
Expand Down
3 changes: 1 addition & 2 deletions src/utf8char/iter_fixed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,7 @@ impl<'a> IterFixedUtf8Char<'a> {
}
}

#[expect(clippy::needless_lifetimes)]
impl<'a> Iterator for IterFixedUtf8Char<'a> {
impl Iterator for IterFixedUtf8Char<'_> {
type Item = FixedUtf8Char;

#[inline]
Expand Down
3 changes: 1 addition & 2 deletions src/write/sep_by.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,7 @@ pub struct SepBy<'a, I, S: ?Sized> {
iter: I,
}

#[expect(clippy::needless_lifetimes)]
impl<'a, I: Clone, S: ?Sized> Clone for SepBy<'a, I, S> {
impl<I: Clone, S: ?Sized> Clone for SepBy<'_, I, S> {
#[inline]
fn clone(&self) -> Self {
Self {
Expand Down

0 comments on commit cbd3643

Please sign in to comment.