diff --git a/omf-c/src/ffi_tools/arg.rs b/omf-c/src/ffi_tools/arg.rs index 1fbb13f..340242a 100644 --- a/omf-c/src/ffi_tools/arg.rs +++ b/omf-c/src/ffi_tools/arg.rs @@ -7,7 +7,7 @@ use crate::error::{Error, InvalidArg}; /// # Safety /// /// Pointer must be null or valid. See `core::ptr::const_ptr::as_ref` for details. -pub unsafe fn ref_from_ptr(arg_name: &'static str, ptr: *const T) -> Result<&T, Error> { +pub unsafe fn ref_from_ptr<'a, T>(arg_name: &'static str, ptr: *const T) -> Result<&'a T, Error> { unsafe { ptr.as_ref() }.ok_or(InvalidArg::Null(arg_name).into()) } @@ -16,7 +16,7 @@ pub unsafe fn ref_from_ptr(arg_name: &'static str, ptr: *const T) -> Result<& /// # Safety /// /// Pointer must be null or valid. See `core::ptr::const_ptr::as_mut` for details. -pub unsafe fn mut_from_ptr(arg_name: &'static str, ptr: *mut T) -> Result<&mut T, Error> { +pub unsafe fn mut_from_ptr<'a, T>(arg_name: &'static str, ptr: *mut T) -> Result<&'a mut T, Error> { unsafe { ptr.as_mut() }.ok_or(InvalidArg::Null(arg_name).into()) } diff --git a/src/file/zip_container.rs b/src/file/zip_container.rs index f1140b5..81a19ed 100644 --- a/src/file/zip_container.rs +++ b/src/file/zip_container.rs @@ -87,13 +87,13 @@ pub(crate) struct SubFileWrite<'a> { inner: &'a mut ZipWriter, } -impl<'a> SubFileWrite<'a> { +impl SubFileWrite<'_> { pub fn name(&self) -> &str { &self.name } } -impl<'a> std::io::Write for SubFileWrite<'a> { +impl std::io::Write for SubFileWrite<'_> { fn write(&mut self, buf: &[u8]) -> std::io::Result { self.inner.write(buf) } diff --git a/src/omf1/elements.rs b/src/omf1/elements.rs index dd22c26..6a6edb6 100644 --- a/src/omf1/elements.rs +++ b/src/omf1/elements.rs @@ -53,7 +53,7 @@ impl Project { } } -impl<'a> ElementModel<'a> { +impl ElementModel<'_> { pub fn convert(&self, r: &Omf1Reader, w: &mut Writer) -> Result { match *self { Self::PointSetElement(x) => x.convert(r, w), @@ -177,7 +177,7 @@ impl VolumeElement { } } -impl<'a> DataModel<'a> { +impl DataModel<'_> { pub fn convert(&self, r: &Omf1Reader, w: &mut Writer) -> Result { match *self { DataModel::ScalarData(x) => x.convert(r, w), diff --git a/src/omf1/objects.rs b/src/omf1/objects.rs index 0a56d18..164103d 100644 --- a/src/omf1/objects.rs +++ b/src/omf1/objects.rs @@ -30,7 +30,7 @@ struct KeyVisitor { _phantom: PhantomData, } -impl<'de, T> serde::de::Visitor<'de> for KeyVisitor { +impl serde::de::Visitor<'_> for KeyVisitor { type Value = Key; fn expecting(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result { diff --git a/src/pqarray/source.rs b/src/pqarray/source.rs index eeef2d8..6ce2e60 100644 --- a/src/pqarray/source.rs +++ b/src/pqarray/source.rs @@ -14,7 +14,7 @@ pub trait RowGrouper { fn next_column(&mut self) -> Result>, ParquetError>; } -impl<'a, W: Write + Send> RowGrouper for SerializedRowGroupWriter<'a, W> { +impl RowGrouper for SerializedRowGroupWriter<'_, W> { fn next_column(&mut self) -> Result>, ParquetError> { SerializedRowGroupWriter::next_column(self) }