Skip to content

Commit

Permalink
Allow some clippy::needless_lifetimes
Browse files Browse the repository at this point in the history
Often explicit is better than implicit.
  • Loading branch information
TheVeryDarkness committed Dec 24, 2024
1 parent 9df637a commit 848c34b
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,13 +12,17 @@
#![forbid(
clippy::correctness,
clippy::suspicious,
clippy::complexity,
clippy::perf,
clippy::style,
clippy::cargo
clippy::cargo,
clippy::should_panic_without_expect,
clippy::incompatible_msrv,
clippy::expect_used,
clippy::missing_safety_doc,
clippy::missing_panics_doc
)]
#![forbid(clippy::should_panic_without_expect, clippy::incompatible_msrv)]
#![forbid(rustdoc::all)]
#![deny(clippy::complexity)]

//! A utility library for reading data from input and writing data to output.
//!
Expand Down
2 changes: 2 additions & 0 deletions src/read/iter.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +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>
{
Expand Down Expand Up @@ -60,6 +61,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> {
type Item = Result<T, ReadOneFromError<T>>;

Expand Down
1 change: 1 addition & 0 deletions src/utf8char/iter_fixed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ impl<'a> IterFixedUtf8Char<'a> {
}
}

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

Expand Down
1 change: 1 addition & 0 deletions src/write/sep_by.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +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> {
#[inline]
fn clone(&self) -> Self {
Expand Down

0 comments on commit 848c34b

Please sign in to comment.