From 59b4679d8d0324db0dd06416eb3c9145f6827de2 Mon Sep 17 00:00:00 2001 From: Bruce Mitchener Date: Sat, 15 Feb 2025 13:12:27 +0700 Subject: [PATCH] Fix `clippy::needless_lifetimes` lints --- src/drawing_item.rs | 4 ++-- src/entity_iter.rs | 4 ++-- src/object_iter.rs | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/drawing_item.rs b/src/drawing_item.rs index 47f78aa..4334ca7 100644 --- a/src/drawing_item.rs +++ b/src/drawing_item.rs @@ -19,7 +19,7 @@ pub enum DrawingItem<'a> { ViewPort(&'a ViewPort), } -impl<'a> DrawingItem<'a> { +impl DrawingItem<'_> { pub fn handle(&self) -> Handle { match self { DrawingItem::AppId(app_id) => app_id.handle, @@ -53,7 +53,7 @@ pub enum DrawingItemMut<'a> { ViewPort(&'a mut ViewPort), } -impl<'a> DrawingItemMut<'a> { +impl DrawingItemMut<'_> { pub fn handle(&self) -> Handle { match self { DrawingItemMut::AppId(ref app_id) => app_id.handle, diff --git a/src/entity_iter.rs b/src/entity_iter.rs index fe44b83..a038f93 100644 --- a/src/entity_iter.rs +++ b/src/entity_iter.rs @@ -9,7 +9,7 @@ pub(crate) struct EntityIter<'a> { pub iter: &'a mut CodePairPutBack, } -impl<'a> Iterator for EntityIter<'a> { +impl Iterator for EntityIter<'_> { type Item = Entity; fn next(&mut self) -> Option { @@ -20,7 +20,7 @@ impl<'a> Iterator for EntityIter<'a> { } } -impl<'a> EntityIter<'a> { +impl EntityIter<'_> { pub(crate) fn read_entities_into_vec(&mut self, entities: &mut Vec) -> DxfResult<()> { collect_entities(self, entities) } diff --git a/src/object_iter.rs b/src/object_iter.rs index 66f7b13..007c6c9 100644 --- a/src/object_iter.rs +++ b/src/object_iter.rs @@ -5,7 +5,7 @@ pub(crate) struct ObjectIter<'a> { pub iter: &'a mut CodePairPutBack, } -impl<'a> Iterator for ObjectIter<'a> { +impl Iterator for ObjectIter<'_> { type Item = Object; fn next(&mut self) -> Option {