From 01ed20cecc7a273957ff201ad8847dc072ab4ddc Mon Sep 17 00:00:00 2001 From: Simon Walker Date: Sun, 13 Oct 2024 16:12:38 +0100 Subject: [PATCH] Allow needless-lifetimes (#363) Fix a nightly clippy lint --- fitsio/src/errors.rs | 2 +- fitsio/src/hdu.rs | 4 ++-- fitsio/src/headers/mod.rs | 2 +- fitsio/src/tables.rs | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/fitsio/src/errors.rs b/fitsio/src/errors.rs index af452d27..543805cd 100644 --- a/fitsio/src/errors.rs +++ b/fitsio/src/errors.rs @@ -121,7 +121,7 @@ impl ::std::convert::From for Error { use crate::fitsfile::FitsFile; type PoisonError<'a> = sync::PoisonError>; -impl<'a> ::std::convert::From> for Error { +impl ::std::convert::From> for Error { fn from(_e: PoisonError) -> Self { Error::UnlockError } diff --git a/fitsio/src/hdu.rs b/fitsio/src/hdu.rs index 5c6b1e62..a49aab5b 100644 --- a/fitsio/src/hdu.rs +++ b/fitsio/src/hdu.rs @@ -960,7 +960,7 @@ pub struct FitsHduIterator<'a> { pub(crate) fits_file: &'a mut FitsFile, } -impl<'a> Iterator for FitsHduIterator<'a> { +impl Iterator for FitsHduIterator<'_> { type Item = FitsHdu; fn next(&mut self) -> Option { @@ -1002,7 +1002,7 @@ impl DescribesHdu for usize { } } -impl<'a> DescribesHdu for &'a str { +impl DescribesHdu for &'_ str { fn change_hdu(&self, f: &mut FitsFile) -> Result<()> { let mut status = 0; let c_hdu_name = ffi::CString::new(*self)?; diff --git a/fitsio/src/headers/mod.rs b/fitsio/src/headers/mod.rs index d24a77cf..d4f336f5 100644 --- a/fitsio/src/headers/mod.rs +++ b/fitsio/src/headers/mod.rs @@ -287,7 +287,7 @@ impl WritesKey for String { } } -impl<'a> WritesKey for &'a str { +impl WritesKey for &'_ str { fn write_key(f: &mut FitsFile, name: &str, value: Self) -> Result<()> { let c_name = ffi::CString::new(name)?; let c_value = ffi::CString::new(value)?; diff --git a/fitsio/src/tables.rs b/fitsio/src/tables.rs index 55ce9593..b5dff7b4 100644 --- a/fitsio/src/tables.rs +++ b/fitsio/src/tables.rs @@ -772,7 +772,7 @@ impl DescribesColumnLocation for usize { } } -impl<'a> DescribesColumnLocation for &'a str { +impl DescribesColumnLocation for &'_ str { fn get_column_no(&self, hdu: &FitsHdu, fits_file: &mut FitsFile) -> Result { match hdu.get_column_no(fits_file, *self) { Ok(value) => Ok(value as _), @@ -849,7 +849,7 @@ impl<'a> ColumnIterator<'a> { } } -impl<'a> Iterator for ColumnIterator<'a> { +impl Iterator for ColumnIterator<'_> { type Item = Column; fn next(&mut self) -> Option {