Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow needless-lifetimes #363

Merged
merged 1 commit into from
Oct 13, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading