From 2d669bf22e965eaca5198a9e3212452266f59975 Mon Sep 17 00:00:00 2001 From: Philipp Schuster Date: Mon, 21 Oct 2024 16:10:28 +0200 Subject: [PATCH] multiboot2: apply latest nightly clippy suggestions --- multiboot2/src/elf_sections.rs | 6 +++--- multiboot2/src/framebuffer.rs | 2 +- multiboot2/src/memory_map.rs | 4 ++-- multiboot2/src/module.rs | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/multiboot2/src/elf_sections.rs b/multiboot2/src/elf_sections.rs index 0f6c1e1f..b2cc2499 100644 --- a/multiboot2/src/elf_sections.rs +++ b/multiboot2/src/elf_sections.rs @@ -141,13 +141,13 @@ impl<'a> Iterator for ElfSectionIter<'a> { } } -impl<'a> ExactSizeIterator for ElfSectionIter<'a> { +impl ExactSizeIterator for ElfSectionIter<'_> { fn len(&self) -> usize { self.remaining_sections as usize } } -impl<'a> Debug for ElfSectionIter<'a> { +impl Debug for ElfSectionIter<'_> { fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { /// Limit how many Elf-Sections should be debug-formatted. /// Can be thousands of sections for a Rust binary => this is useless output. @@ -218,7 +218,7 @@ struct ElfSectionInner64 { entry_size: u64, } -impl<'a> ElfSection<'a> { +impl ElfSection<'_> { /// Get the section type as a `ElfSectionType` enum variant. #[must_use] pub fn section_type(&self) -> ElfSectionType { diff --git a/multiboot2/src/framebuffer.rs b/multiboot2/src/framebuffer.rs index 78b5da0e..38b31793 100644 --- a/multiboot2/src/framebuffer.rs +++ b/multiboot2/src/framebuffer.rs @@ -319,7 +319,7 @@ pub enum FramebufferType<'a> { Text, } -impl<'a> FramebufferType<'a> { +impl FramebufferType<'_> { #[must_use] #[cfg(feature = "builder")] const fn id(&self) -> FramebufferTypeId { diff --git a/multiboot2/src/memory_map.rs b/multiboot2/src/memory_map.rs index a46feb67..2d633fd4 100644 --- a/multiboot2/src/memory_map.rs +++ b/multiboot2/src/memory_map.rs @@ -455,13 +455,13 @@ impl<'a> Iterator for EFIMemoryAreaIter<'a> { } } -impl<'a> ExactSizeIterator for EFIMemoryAreaIter<'a> { +impl ExactSizeIterator for EFIMemoryAreaIter<'_> { fn len(&self) -> usize { self.entries } } -impl<'a> Debug for EFIMemoryAreaIter<'a> { +impl Debug for EFIMemoryAreaIter<'_> { fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { let mut debug = f.debug_list(); let iter = self.clone(); diff --git a/multiboot2/src/module.rs b/multiboot2/src/module.rs index 73a334e1..aa7e30d4 100644 --- a/multiboot2/src/module.rs +++ b/multiboot2/src/module.rs @@ -123,7 +123,7 @@ impl<'a> Iterator for ModuleIter<'a> { } } -impl<'a> Debug for ModuleIter<'a> { +impl Debug for ModuleIter<'_> { fn fmt(&self, f: &mut Formatter<'_>) -> core::fmt::Result { let mut list = f.debug_list(); self.clone().for_each(|tag| {