Skip to content

Commit

Permalink
Allow needless-lifetimes (#363)
Browse files Browse the repository at this point in the history
Fix a nightly clippy lint
  • Loading branch information
simonrw authored Oct 13, 2024
1 parent 645589d commit 01ed20c
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion fitsio/src/errors.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ impl ::std::convert::From<IntoStringError> for Error {
use crate::fitsfile::FitsFile;
type PoisonError<'a> = sync::PoisonError<sync::MutexGuard<'a, FitsFile>>;

impl<'a> ::std::convert::From<PoisonError<'a>> for Error {
impl ::std::convert::From<PoisonError<'_>> for Error {
fn from(_e: PoisonError) -> Self {
Error::UnlockError
}
Expand Down
4 changes: 2 additions & 2 deletions fitsio/src/hdu.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<Self::Item> {
Expand Down Expand Up @@ -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)?;
Expand Down
2 changes: 1 addition & 1 deletion fitsio/src/headers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down
4 changes: 2 additions & 2 deletions fitsio/src/tables.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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<i32> {
match hdu.get_column_no(fits_file, *self) {
Ok(value) => Ok(value as _),
Expand Down Expand Up @@ -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<Self::Item> {
Expand Down

0 comments on commit 01ed20c

Please sign in to comment.