Skip to content

Commit

Permalink
Fix clippy::needless_lifetimes (#329)
Browse files Browse the repository at this point in the history
  • Loading branch information
yutannihilation authored Dec 2, 2024
1 parent 0a9d5a7 commit 1de7d1b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions src/sexp/list.rs
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ pub struct ListSexpValueIter<'a> {
len: usize,
}

impl<'a> Iterator for ListSexpValueIter<'a> {
impl Iterator for ListSexpValueIter<'_> {
type Item = Sexp;

fn next(&mut self) -> Option<Self::Item> {
Expand All @@ -307,6 +307,6 @@ impl<'a> Iterator for ListSexpValueIter<'a> {
}
}

impl<'a> ExactSizeIterator for ListSexpValueIter<'a> {}
impl ExactSizeIterator for ListSexpValueIter<'_> {}

type ListSexpIter<'a> = std::iter::Zip<std::vec::IntoIter<&'static str>, ListSexpValueIter<'a>>;
4 changes: 2 additions & 2 deletions src/sexp/logical.rs
Original file line number Diff line number Diff line change
Expand Up @@ -425,7 +425,7 @@ pub struct LogicalSexpIter<'a> {
iter_raw: std::slice::Iter<'a, i32>,
}

impl<'a> Iterator for LogicalSexpIter<'a> {
impl Iterator for LogicalSexpIter<'_> {
type Item = bool;

fn next(&mut self) -> Option<Self::Item> {
Expand All @@ -437,4 +437,4 @@ impl<'a> Iterator for LogicalSexpIter<'a> {
}
}

impl<'a> ExactSizeIterator for LogicalSexpIter<'a> {}
impl ExactSizeIterator for LogicalSexpIter<'_> {}
6 changes: 3 additions & 3 deletions src/sexp/numeric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ pub struct NumericIteratorI32<'a> {
len: usize,
}

impl<'a> Iterator for NumericIteratorI32<'a> {
impl Iterator for NumericIteratorI32<'_> {
type Item = crate::error::Result<i32>;

fn next(&mut self) -> Option<Self::Item> {
Expand Down Expand Up @@ -429,7 +429,7 @@ pub struct NumericIteratorF64<'a> {
len: usize,
}

impl<'a> Iterator for NumericIteratorF64<'a> {
impl Iterator for NumericIteratorF64<'_> {
type Item = f64;

fn next(&mut self) -> Option<Self::Item> {
Expand Down Expand Up @@ -460,7 +460,7 @@ pub struct NumericIteratorUsize<'a> {
len: usize,
}

impl<'a> Iterator for NumericIteratorUsize<'a> {
impl Iterator for NumericIteratorUsize<'_> {
type Item = crate::error::Result<usize>;

fn next(&mut self) -> Option<Self::Item> {
Expand Down
4 changes: 2 additions & 2 deletions src/sexp/string.rs
Original file line number Diff line number Diff line change
Expand Up @@ -375,7 +375,7 @@ pub struct StringSexpIter<'a> {
len: usize,
}

impl<'a> Iterator for StringSexpIter<'a> {
impl Iterator for StringSexpIter<'_> {
// The lifetime here is 'static, not 'a, in the assumption that strings in
// `R_StringHash`, the global `CHARSXP` cache, won't be deleted during the R
// session.
Expand Down Expand Up @@ -416,4 +416,4 @@ impl<'a> Iterator for StringSexpIter<'a> {
}
}

impl<'a> ExactSizeIterator for StringSexpIter<'a> {}
impl ExactSizeIterator for StringSexpIter<'_> {}

0 comments on commit 1de7d1b

Please sign in to comment.