From 738a22bce504c2b7f007174b38c44c155695c778 Mon Sep 17 00:00:00 2001 From: Connor Slade Date: Sat, 8 Feb 2025 13:33:22 -0500 Subject: [PATCH] Elide lifetimes --- common/src/image.rs | 2 +- mslicer/src/windows/mod.rs | 2 +- slicer/src/format/iter.rs | 8 ++++---- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/src/image.rs b/common/src/image.rs index a2ba83e..7207094 100644 --- a/common/src/image.rs +++ b/common/src/image.rs @@ -93,7 +93,7 @@ impl Image { } } -impl<'a> Iterator for ImageRuns<'a> { +impl Iterator for ImageRuns<'_> { type Item = Run; fn next(&mut self) -> Option { diff --git a/mslicer/src/windows/mod.rs b/mslicer/src/windows/mod.rs index 8fa8681..265853f 100644 --- a/mslicer/src/windows/mod.rs +++ b/mslicer/src/windows/mod.rs @@ -50,7 +50,7 @@ impl Tab { } } -impl<'a> TabViewer for Tabs<'a> { +impl TabViewer for Tabs<'_> { type Tab = Tab; fn title(&mut self, tab: &mut Self::Tab) -> WidgetText { diff --git a/slicer/src/format/iter.rs b/slicer/src/format/iter.rs index 41bb769..82ca362 100644 --- a/slicer/src/format/iter.rs +++ b/slicer/src/format/iter.rs @@ -45,7 +45,7 @@ impl<'a> Iterator for SliceLayerIterator<'a> { } } -impl<'a> Drop for SliceLayerElement<'a> { +impl Drop for SliceLayerElement<'_> { fn drop(&mut self) { // SAFETY: it's not... But the idea is that each SliceLayerElement will // only be writing to one layer each, meaning the same memory will only @@ -55,7 +55,7 @@ impl<'a> Drop for SliceLayerElement<'a> { } } -impl<'a> Deref for SliceLayerElement<'a> { +impl Deref for SliceLayerElement<'_> { type Target = GrayImage; fn deref(&self) -> &Self::Target { @@ -63,10 +63,10 @@ impl<'a> Deref for SliceLayerElement<'a> { } } -impl<'a> DerefMut for SliceLayerElement<'a> { +impl DerefMut for SliceLayerElement<'_> { fn deref_mut(&mut self) -> &mut Self::Target { &mut self.image } } -unsafe impl<'a> Send for SliceLayerElement<'a> {} +unsafe impl Send for SliceLayerElement<'_> {}