From 1de7d1b8996570b050b3b347594d93337754c6d1 Mon Sep 17 00:00:00 2001 From: Hiroaki Yutani Date: Mon, 2 Dec 2024 09:56:29 +0900 Subject: [PATCH] Fix clippy::needless_lifetimes (#329) --- src/sexp/list.rs | 4 ++-- src/sexp/logical.rs | 4 ++-- src/sexp/numeric.rs | 6 +++--- src/sexp/string.rs | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/src/sexp/list.rs b/src/sexp/list.rs index d9bb9ca7..878ad62a 100644 --- a/src/sexp/list.rs +++ b/src/sexp/list.rs @@ -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 { @@ -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, ListSexpValueIter<'a>>; diff --git a/src/sexp/logical.rs b/src/sexp/logical.rs index 9dd9b6b8..37d2b6ce 100644 --- a/src/sexp/logical.rs +++ b/src/sexp/logical.rs @@ -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 { @@ -437,4 +437,4 @@ impl<'a> Iterator for LogicalSexpIter<'a> { } } -impl<'a> ExactSizeIterator for LogicalSexpIter<'a> {} +impl ExactSizeIterator for LogicalSexpIter<'_> {} diff --git a/src/sexp/numeric.rs b/src/sexp/numeric.rs index 24b49fcb..b3043c5c 100644 --- a/src/sexp/numeric.rs +++ b/src/sexp/numeric.rs @@ -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; fn next(&mut self) -> Option { @@ -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 { @@ -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; fn next(&mut self) -> Option { diff --git a/src/sexp/string.rs b/src/sexp/string.rs index f22edb52..35d59d42 100644 --- a/src/sexp/string.rs +++ b/src/sexp/string.rs @@ -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. @@ -416,4 +416,4 @@ impl<'a> Iterator for StringSexpIter<'a> { } } -impl<'a> ExactSizeIterator for StringSexpIter<'a> {} +impl ExactSizeIterator for StringSexpIter<'_> {}