From ad46b8b721b5114a2f92cf21a26d11f25ffe8cb5 Mon Sep 17 00:00:00 2001 From: Robin Freyler Date: Fri, 4 Oct 2024 11:38:47 +0200 Subject: [PATCH] Apply `clippy --fix` - removing lots of unnecessary lifetime annotations (#1220) apply clippy --fix --- crates/cli/src/display.rs | 2 +- crates/collections/src/arena/component_vec.rs | 2 +- crates/collections/src/arena/mod.rs | 8 ++++---- crates/ir/src/sequence.rs | 8 ++++---- crates/ir/src/span.rs | 4 ++-- crates/wasmi/src/engine/executor/instrs.rs | 4 ++-- .../wasmi/src/engine/executor/instrs/binary.rs | 16 ++++++++-------- .../wasmi/src/engine/executor/instrs/branch.rs | 4 ++-- crates/wasmi/src/engine/executor/instrs/call.rs | 2 +- .../src/engine/executor/instrs/comparison.rs | 4 ++-- .../src/engine/executor/instrs/conversion.rs | 2 +- crates/wasmi/src/engine/executor/instrs/copy.rs | 2 +- .../wasmi/src/engine/executor/instrs/global.rs | 2 +- crates/wasmi/src/engine/executor/instrs/load.rs | 4 ++-- .../wasmi/src/engine/executor/instrs/memory.rs | 2 +- .../wasmi/src/engine/executor/instrs/return_.rs | 2 +- crates/wasmi/src/engine/executor/instrs/store.rs | 6 +++--- crates/wasmi/src/engine/executor/instrs/table.rs | 2 +- crates/wasmi/src/engine/executor/instrs/unary.rs | 2 +- crates/wasmi/src/engine/traits.rs | 4 ++-- crates/wasmi/src/engine/translator/labels.rs | 2 +- crates/wasmi/src/engine/translator/mod.rs | 4 ++-- .../wasmi/src/engine/translator/stack/consts.rs | 6 +++--- crates/wasmi/src/module/mod.rs | 8 ++++---- crates/wasmi/src/store.rs | 6 +++--- fuzz/fuzz_targets/differential.rs | 6 +++--- 26 files changed, 57 insertions(+), 57 deletions(-) diff --git a/crates/cli/src/display.rs b/crates/cli/src/display.rs index 311ad28ed6..a8ff3e07ba 100644 --- a/crates/cli/src/display.rs +++ b/crates/cli/src/display.rs @@ -33,7 +33,7 @@ impl<'a> From<&'a Val> for DisplayValue<'a> { } } -impl<'a> fmt::Display for DisplayValue<'a> { +impl fmt::Display for DisplayValue<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { match &self.0 { Val::I32(value) => write!(f, "{value}"), diff --git a/crates/collections/src/arena/component_vec.rs b/crates/collections/src/arena/component_vec.rs index e3eced2351..01d4ace3de 100644 --- a/crates/collections/src/arena/component_vec.rs +++ b/crates/collections/src/arena/component_vec.rs @@ -31,7 +31,7 @@ where struct DebugComponents<'a, T>(&'a [Option]); -impl<'a, T> Debug for DebugComponents<'a, T> +impl Debug for DebugComponents<'_, T> where T: Debug, { diff --git a/crates/collections/src/arena/mod.rs b/crates/collections/src/arena/mod.rs index 7d1a1b0654..354c7f2c00 100644 --- a/crates/collections/src/arena/mod.rs +++ b/crates/collections/src/arena/mod.rs @@ -233,7 +233,7 @@ where } } -impl<'a, Idx, T> DoubleEndedIterator for Iter<'a, Idx, T> +impl DoubleEndedIterator for Iter<'_, Idx, T> where Idx: ArenaIndex, { @@ -245,7 +245,7 @@ where } } -impl<'a, Idx, T> ExactSizeIterator for Iter<'a, Idx, T> +impl ExactSizeIterator for Iter<'_, Idx, T> where Idx: ArenaIndex, { @@ -281,7 +281,7 @@ where } } -impl<'a, Idx, T> DoubleEndedIterator for IterMut<'a, Idx, T> +impl DoubleEndedIterator for IterMut<'_, Idx, T> where Idx: ArenaIndex, { @@ -293,7 +293,7 @@ where } } -impl<'a, Idx, T> ExactSizeIterator for IterMut<'a, Idx, T> +impl ExactSizeIterator for IterMut<'_, Idx, T> where Idx: ArenaIndex, { diff --git a/crates/ir/src/sequence.rs b/crates/ir/src/sequence.rs index 1386af6a1e..159ea27f39 100644 --- a/crates/ir/src/sequence.rs +++ b/crates/ir/src/sequence.rs @@ -184,13 +184,13 @@ impl<'a> Iterator for InstrIter<'a> { } } -impl<'a> DoubleEndedIterator for InstrIter<'a> { +impl DoubleEndedIterator for InstrIter<'_> { fn next_back(&mut self) -> Option { self.instrs.next_back() } } -impl<'a> ExactSizeIterator for InstrIter<'a> {} +impl ExactSizeIterator for InstrIter<'_> {} /// Iterator yielding the [`Instruction`]s of an [`InstrSequence`] mutably. #[derive(Debug)] @@ -220,10 +220,10 @@ impl<'a> Iterator for InstrIterMut<'a> { } } -impl<'a> DoubleEndedIterator for InstrIterMut<'a> { +impl DoubleEndedIterator for InstrIterMut<'_> { fn next_back(&mut self) -> Option { self.instrs.next_back() } } -impl<'a> ExactSizeIterator for InstrIterMut<'a> {} +impl ExactSizeIterator for InstrIterMut<'_> {} diff --git a/crates/ir/src/span.rs b/crates/ir/src/span.rs index c7d557440f..4b83e79abc 100644 --- a/crates/ir/src/span.rs +++ b/crates/ir/src/span.rs @@ -118,7 +118,7 @@ impl FixedRegSpan { } } -impl<'a, const N: u16> IntoIterator for &'a FixedRegSpan { +impl IntoIterator for &FixedRegSpan { type Item = Reg; type IntoIter = RegSpanIter; @@ -187,7 +187,7 @@ impl BoundedRegSpan { } } -impl<'a> IntoIterator for &'a BoundedRegSpan { +impl IntoIterator for &BoundedRegSpan { type Item = Reg; type IntoIter = RegSpanIter; diff --git a/crates/wasmi/src/engine/executor/instrs.rs b/crates/wasmi/src/engine/executor/instrs.rs index 7b3ab2b26a..84976a19dd 100644 --- a/crates/wasmi/src/engine/executor/instrs.rs +++ b/crates/wasmi/src/engine/executor/instrs.rs @@ -1433,7 +1433,7 @@ macro_rules! get_entity { } } -impl<'engine> Executor<'engine> { +impl Executor<'_> { get_entity! { fn get_func(&self, index: index::Func) -> Func; fn get_func_type_dedup(&self, index: index::FuncType) -> DedupFuncType; @@ -1725,7 +1725,7 @@ impl<'engine> Executor<'engine> { } } -impl<'engine> Executor<'engine> { +impl Executor<'_> { /// Used for all [`Instruction`] words that are not meant for execution. /// /// # Note diff --git a/crates/wasmi/src/engine/executor/instrs/binary.rs b/crates/wasmi/src/engine/executor/instrs/binary.rs index 5251587d9f..749a361640 100644 --- a/crates/wasmi/src/engine/executor/instrs/binary.rs +++ b/crates/wasmi/src/engine/executor/instrs/binary.rs @@ -19,7 +19,7 @@ macro_rules! impl_binary { )* }; } -impl<'engine> Executor<'engine> { +impl Executor<'_> { impl_binary! { (Instruction::I32Add, execute_i32_add, UntypedVal::i32_add), (Instruction::I32Sub, execute_i32_sub, UntypedVal::i32_sub), @@ -78,7 +78,7 @@ macro_rules! impl_binary_imm16 { )* }; } -impl<'engine> Executor<'engine> { +impl Executor<'_> { impl_binary_imm16! { (i32, Instruction::I32AddImm16, execute_i32_add_imm16, UntypedVal::i32_add), (i32, Instruction::I32MulImm16, execute_i32_mul_imm16, UntypedVal::i32_mul), @@ -120,7 +120,7 @@ macro_rules! impl_binary_imm16_rev { )* }; } -impl<'engine> Executor<'engine> { +impl Executor<'_> { impl_binary_imm16_rev! { (i32, Instruction::I32SubImm16Rev, execute_i32_sub_imm16_rev, UntypedVal::i32_sub), (i64, Instruction::I64SubImm16Rev, execute_i64_sub_imm16_rev, UntypedVal::i64_sub), @@ -149,7 +149,7 @@ macro_rules! impl_fallible_binary { )* }; } -impl<'engine> Executor<'engine> { +impl Executor<'_> { impl_fallible_binary! { (Instruction::I32DivS, execute_i32_div_s, UntypedVal::i32_div_s), (Instruction::I32DivU, execute_i32_div_u, UntypedVal::i32_div_u), @@ -240,7 +240,7 @@ macro_rules! impl_divrem_s_imm16 { )* }; } -impl<'engine> Executor<'engine> { +impl Executor<'_> { impl_divrem_s_imm16! { (NonZeroI32, Instruction::I32DivSImm16, execute_i32_div_s_imm16, ::i32_div_s), (NonZeroI32, Instruction::I32RemSImm16, execute_i32_rem_s_imm16, ::i32_rem_s), @@ -260,7 +260,7 @@ macro_rules! impl_divrem_u_imm16 { )* }; } -impl<'engine> Executor<'engine> { +impl Executor<'_> { impl_divrem_u_imm16! { (NonZeroU32, Instruction::I32DivUImm16, execute_i32_div_u_imm16, ::i32_div_u), (NonZeroU32, Instruction::I32RemUImm16, execute_i32_rem_u_imm16, ::i32_rem_u), @@ -280,7 +280,7 @@ macro_rules! impl_fallible_binary_imm16_rev { )* }; } -impl<'engine> Executor<'engine> { +impl Executor<'_> { impl_fallible_binary_imm16_rev! { (i32, Instruction::I32DivSImm16Rev, execute_i32_div_s_imm16_rev, UntypedVal::i32_div_s), (u32, Instruction::I32DivUImm16Rev, execute_i32_div_u_imm16_rev, UntypedVal::i32_div_u), @@ -294,7 +294,7 @@ impl<'engine> Executor<'engine> { } } -impl<'engine> Executor<'engine> { +impl Executor<'_> { /// Executes an [`Instruction::F32CopysignImm`]. pub fn execute_f32_copysign_imm(&mut self, result: Reg, lhs: Reg, rhs: Sign) { let lhs = self.get_register(lhs); diff --git a/crates/wasmi/src/engine/executor/instrs/branch.rs b/crates/wasmi/src/engine/executor/instrs/branch.rs index 2dd45f3ad6..44bce2a830 100644 --- a/crates/wasmi/src/engine/executor/instrs/branch.rs +++ b/crates/wasmi/src/engine/executor/instrs/branch.rs @@ -16,7 +16,7 @@ use crate::{ }; use core::cmp; -impl<'engine> Executor<'engine> { +impl Executor<'_> { /// Branches and adjusts the value stack. /// /// # Note @@ -398,7 +398,7 @@ impl_execute_branch_binop_imm! { (u64, Instruction::BranchI64GeUImm, execute_branch_i64_ge_u_imm, cmp_ge), } -impl<'engine> Executor<'engine> { +impl Executor<'_> { /// Executes an [`Instruction::BranchCmpFallback`]. pub fn execute_branch_cmp_fallback(&mut self, lhs: Reg, rhs: Reg, params: Reg) { use Comparator as C; diff --git a/crates/wasmi/src/engine/executor/instrs/call.rs b/crates/wasmi/src/engine/executor/instrs/call.rs index 3abdc140df..09a20099ce 100644 --- a/crates/wasmi/src/engine/executor/instrs/call.rs +++ b/crates/wasmi/src/engine/executor/instrs/call.rs @@ -149,7 +149,7 @@ mod marker { } } -impl<'engine> Executor<'engine> { +impl Executor<'_> { /// Updates the [`InstructionPtr`] of the caller [`CallFrame`] before dispatching a call. /// /// # Note diff --git a/crates/wasmi/src/engine/executor/instrs/comparison.rs b/crates/wasmi/src/engine/executor/instrs/comparison.rs index a49d826eea..ced14af0e7 100644 --- a/crates/wasmi/src/engine/executor/instrs/comparison.rs +++ b/crates/wasmi/src/engine/executor/instrs/comparison.rs @@ -18,7 +18,7 @@ macro_rules! impl_comparison { }; } -impl<'engine> Executor<'engine> { +impl Executor<'_> { impl_comparison! { (Instruction::I32Eq, execute_i32_eq, UntypedVal::i32_eq), (Instruction::I32Ne, execute_i32_ne, UntypedVal::i32_ne), @@ -69,7 +69,7 @@ macro_rules! impl_comparison_imm16 { }; } -impl<'engine> Executor<'engine> { +impl Executor<'_> { impl_comparison_imm16! { (i32, Instruction::I32EqImm16, execute_i32_eq_imm16, UntypedVal::i32_eq), (i32, Instruction::I32NeImm16, execute_i32_ne_imm16, UntypedVal::i32_ne), diff --git a/crates/wasmi/src/engine/executor/instrs/conversion.rs b/crates/wasmi/src/engine/executor/instrs/conversion.rs index 2f5e716dfd..70cb294978 100644 --- a/crates/wasmi/src/engine/executor/instrs/conversion.rs +++ b/crates/wasmi/src/engine/executor/instrs/conversion.rs @@ -26,7 +26,7 @@ macro_rules! impl_fallible_conversion_impls { }; } -impl<'engine> Executor<'engine> { +impl Executor<'_> { impl_conversion_impls! { (Instruction::I32WrapI64, execute_i32_wrap_i64, UntypedVal::i32_wrap_i64), diff --git a/crates/wasmi/src/engine/executor/instrs/copy.rs b/crates/wasmi/src/engine/executor/instrs/copy.rs index 9bad016add..4821fc3a58 100644 --- a/crates/wasmi/src/engine/executor/instrs/copy.rs +++ b/crates/wasmi/src/engine/executor/instrs/copy.rs @@ -9,7 +9,7 @@ use crate::{ use core::slice; use smallvec::SmallVec; -impl<'engine> Executor<'engine> { +impl Executor<'_> { /// Executes a generic `copy` [`Instruction`]. fn execute_copy_impl(&mut self, result: Reg, value: T, f: fn(&mut Self, T) -> UntypedVal) { let value = f(self, value); diff --git a/crates/wasmi/src/engine/executor/instrs/global.rs b/crates/wasmi/src/engine/executor/instrs/global.rs index b586075be9..ef0dbf0808 100644 --- a/crates/wasmi/src/engine/executor/instrs/global.rs +++ b/crates/wasmi/src/engine/executor/instrs/global.rs @@ -8,7 +8,7 @@ use crate::{ #[cfg(doc)] use crate::engine::bytecode::Instruction; -impl<'engine> Executor<'engine> { +impl Executor<'_> { /// Executes an [`Instruction::GlobalGet`]. pub fn execute_global_get(&mut self, store: &StoreInner, result: Reg, global: index::Global) { let value = match u32::from(global) { diff --git a/crates/wasmi/src/engine/executor/instrs/load.rs b/crates/wasmi/src/engine/executor/instrs/load.rs index f9129d6aae..877f62f334 100644 --- a/crates/wasmi/src/engine/executor/instrs/load.rs +++ b/crates/wasmi/src/engine/executor/instrs/load.rs @@ -15,7 +15,7 @@ use crate::{ type WasmLoadOp = fn(memory: &[u8], address: UntypedVal, offset: u32) -> Result; -impl<'engine> Executor<'engine> { +impl Executor<'_> { /// Returns the `ptr` and `offset` parameters for a `load` [`Instruction`]. fn fetch_ptr_and_offset(&self) -> (Reg, u32) { let mut addr: InstructionPtr = self.ip; @@ -208,7 +208,7 @@ macro_rules! impl_execute_load { } } -impl<'engine> Executor<'engine> { +impl Executor<'_> { impl_execute_load! { ( (Instruction::I32Load, execute_i32_load), diff --git a/crates/wasmi/src/engine/executor/instrs/memory.rs b/crates/wasmi/src/engine/executor/instrs/memory.rs index b33b250ded..feb08a35f2 100644 --- a/crates/wasmi/src/engine/executor/instrs/memory.rs +++ b/crates/wasmi/src/engine/executor/instrs/memory.rs @@ -12,7 +12,7 @@ use crate::{ Store, }; -impl<'engine> Executor<'engine> { +impl Executor<'_> { /// Returns the [`Instruction::MemoryIndex`] parameter for an [`Instruction`]. fn fetch_memory_index(&self, offset: usize) -> Memory { let mut addr: InstructionPtr = self.ip; diff --git a/crates/wasmi/src/engine/executor/instrs/return_.rs b/crates/wasmi/src/engine/executor/instrs/return_.rs index 60b00a10d8..a45632b93c 100644 --- a/crates/wasmi/src/engine/executor/instrs/return_.rs +++ b/crates/wasmi/src/engine/executor/instrs/return_.rs @@ -19,7 +19,7 @@ pub enum ReturnOutcome { Host, } -impl<'engine> Executor<'engine> { +impl Executor<'_> { /// Returns the execution to the caller. /// /// Any return values are expected to already have been transferred diff --git a/crates/wasmi/src/engine/executor/instrs/store.rs b/crates/wasmi/src/engine/executor/instrs/store.rs index 87d0743ba6..c83a719ce3 100644 --- a/crates/wasmi/src/engine/executor/instrs/store.rs +++ b/crates/wasmi/src/engine/executor/instrs/store.rs @@ -18,7 +18,7 @@ type WasmStoreOp = fn( value: UntypedVal, ) -> Result<(), TrapCode>; -impl<'engine> Executor<'engine> { +impl Executor<'_> { /// Returns the register `value` and `offset` parameters for a `load` [`Instruction`]. fn fetch_value_and_offset(&self) -> (Reg, u32) { let mut addr: InstructionPtr = self.ip; @@ -324,7 +324,7 @@ macro_rules! impl_execute_istore { )* }; } -impl<'engine> Executor<'engine> { +impl Executor<'_> { impl_execute_istore! { ( (Const16 => i32), @@ -432,7 +432,7 @@ macro_rules! impl_execute_fstore { } } -impl<'engine> Executor<'engine> { +impl Executor<'_> { impl_execute_fstore! { ( (Instruction::F32Store, execute_f32_store), diff --git a/crates/wasmi/src/engine/executor/instrs/table.rs b/crates/wasmi/src/engine/executor/instrs/table.rs index 3d839d19ef..7af1448832 100644 --- a/crates/wasmi/src/engine/executor/instrs/table.rs +++ b/crates/wasmi/src/engine/executor/instrs/table.rs @@ -17,7 +17,7 @@ use crate::{ Store, }; -impl<'engine> Executor<'engine> { +impl Executor<'_> { /// Returns the [`Instruction::TableIndex`] parameter for an [`Instruction`]. fn fetch_table_index(&self, offset: usize) -> Table { let mut addr: InstructionPtr = self.ip; diff --git a/crates/wasmi/src/engine/executor/instrs/unary.rs b/crates/wasmi/src/engine/executor/instrs/unary.rs index 7e33e9f65d..24bf858eb6 100644 --- a/crates/wasmi/src/engine/executor/instrs/unary.rs +++ b/crates/wasmi/src/engine/executor/instrs/unary.rs @@ -15,7 +15,7 @@ macro_rules! impl_unary_impls { }; } -impl<'engine> Executor<'engine> { +impl Executor<'_> { impl_unary_impls! { (Instruction::I32Clz, execute_i32_clz, UntypedVal::i32_clz), (Instruction::I32Ctz, execute_i32_ctz, UntypedVal::i32_ctz), diff --git a/crates/wasmi/src/engine/traits.rs b/crates/wasmi/src/engine/traits.rs index 70c6afd2d9..60d0f81e9f 100644 --- a/crates/wasmi/src/engine/traits.rs +++ b/crates/wasmi/src/engine/traits.rs @@ -35,7 +35,7 @@ pub struct CallParamsValueIter<'a> { iter: iter::Cloned>, } -impl<'a> Iterator for CallParamsValueIter<'a> { +impl Iterator for CallParamsValueIter<'_> { type Item = UntypedVal; #[inline] @@ -76,7 +76,7 @@ pub trait CallResults { fn call_results(self, results: &[UntypedVal]) -> Self::Results; } -impl<'a> CallResults for &'a mut [Val] { +impl CallResults for &mut [Val] { type Results = (); fn len_results(&self) -> usize { diff --git a/crates/wasmi/src/engine/translator/labels.rs b/crates/wasmi/src/engine/translator/labels.rs index a01240f3ab..0cc16786e7 100644 --- a/crates/wasmi/src/engine/translator/labels.rs +++ b/crates/wasmi/src/engine/translator/labels.rs @@ -195,7 +195,7 @@ pub struct ResolvedUserIter<'a> { registry: &'a LabelRegistry, } -impl<'a> Iterator for ResolvedUserIter<'a> { +impl Iterator for ResolvedUserIter<'_> { type Item = (Instr, Result); fn next(&mut self) -> Option { diff --git a/crates/wasmi/src/engine/translator/mod.rs b/crates/wasmi/src/engine/translator/mod.rs index a9b1704ae0..f597a7d667 100644 --- a/crates/wasmi/src/engine/translator/mod.rs +++ b/crates/wasmi/src/engine/translator/mod.rs @@ -421,7 +421,7 @@ impl LazyFuncTranslator { } } -impl<'parser> WasmTranslator<'parser> for LazyFuncTranslator { +impl WasmTranslator<'_> for LazyFuncTranslator { type Allocations = (); fn setup(&mut self, bytes: &[u8]) -> Result { @@ -519,7 +519,7 @@ pub struct FuncTranslator { alloc: FuncTranslatorAllocations, } -impl<'parser> WasmTranslator<'parser> for FuncTranslator { +impl WasmTranslator<'_> for FuncTranslator { type Allocations = FuncTranslatorAllocations; fn setup(&mut self, _bytes: &[u8]) -> Result { diff --git a/crates/wasmi/src/engine/translator/stack/consts.rs b/crates/wasmi/src/engine/translator/stack/consts.rs index f578ebdf89..658031b52c 100644 --- a/crates/wasmi/src/engine/translator/stack/consts.rs +++ b/crates/wasmi/src/engine/translator/stack/consts.rs @@ -120,7 +120,7 @@ impl<'a> FuncLocalConstsIter<'a> { } } -impl<'a> Iterator for FuncLocalConstsIter<'a> { +impl Iterator for FuncLocalConstsIter<'_> { type Item = UntypedVal; fn next(&mut self) -> Option { @@ -128,13 +128,13 @@ impl<'a> Iterator for FuncLocalConstsIter<'a> { } } -impl<'a> DoubleEndedIterator for FuncLocalConstsIter<'a> { +impl DoubleEndedIterator for FuncLocalConstsIter<'_> { fn next_back(&mut self) -> Option { self.iter.next_back().copied() } } -impl<'a> ExactSizeIterator for FuncLocalConstsIter<'a> { +impl ExactSizeIterator for FuncLocalConstsIter<'_> { fn len(&self) -> usize { self.iter.len() } diff --git a/crates/wasmi/src/module/mod.rs b/crates/wasmi/src/module/mod.rs index f3fc0906cd..192c157a35 100644 --- a/crates/wasmi/src/module/mod.rs +++ b/crates/wasmi/src/module/mod.rs @@ -537,7 +537,7 @@ impl<'a> Iterator for ModuleImportsIter<'a> { } } -impl<'a> ExactSizeIterator for ModuleImportsIter<'a> { +impl ExactSizeIterator for ModuleImportsIter<'_> { fn len(&self) -> usize { ExactSizeIterator::len(&self.names) } @@ -595,7 +595,7 @@ pub struct InternalFuncsIter<'a> { iter: iter::Zip, EngineFuncSpanIter>, } -impl<'a> Iterator for InternalFuncsIter<'a> { +impl Iterator for InternalFuncsIter<'_> { type Item = (DedupFuncType, EngineFunc); fn next(&mut self) -> Option { @@ -609,7 +609,7 @@ impl<'a> Iterator for InternalFuncsIter<'a> { } } -impl<'a> ExactSizeIterator for InternalFuncsIter<'a> { +impl ExactSizeIterator for InternalFuncsIter<'_> { fn len(&self) -> usize { ExactSizeIterator::len(&self.iter) } @@ -633,7 +633,7 @@ impl<'a> Iterator for InternalGlobalsIter<'a> { } } -impl<'a> ExactSizeIterator for InternalGlobalsIter<'a> { +impl ExactSizeIterator for InternalGlobalsIter<'_> { fn len(&self) -> usize { ExactSizeIterator::len(&self.iter) } diff --git a/crates/wasmi/src/store.rs b/crates/wasmi/src/store.rs index 3c57cb2fa6..35a5d7431b 100644 --- a/crates/wasmi/src/store.rs +++ b/crates/wasmi/src/store.rs @@ -77,7 +77,7 @@ pub type Stored = GuardedEntity; /// both to make types a little easier to read and to provide a `Debug` impl so /// that `#[derive(Debug)]` works on structs that contain it. pub struct ResourceLimiterRef<'a>(Option<&'a mut (dyn ResourceLimiter)>); -impl<'a> Debug for ResourceLimiterRef<'a> { +impl Debug for ResourceLimiterRef<'_> { fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { write!(f, "ResourceLimiterRef(...)") } @@ -1104,7 +1104,7 @@ pub struct StoreContext<'a, T> { pub(crate) store: &'a Store, } -impl<'a, T> StoreContext<'a, T> { +impl StoreContext<'_, T> { /// Returns the underlying [`Engine`] this store is connected to. pub fn engine(&self) -> &Engine { self.store.engine() @@ -1160,7 +1160,7 @@ pub struct StoreContextMut<'a, T> { pub(crate) store: &'a mut Store, } -impl<'a, T> StoreContextMut<'a, T> { +impl StoreContextMut<'_, T> { /// Returns the underlying [`Engine`] this store is connected to. pub fn engine(&self) -> &Engine { self.store.engine() diff --git a/fuzz/fuzz_targets/differential.rs b/fuzz/fuzz_targets/differential.rs index ada43f5b69..1debbe7043 100644 --- a/fuzz/fuzz_targets/differential.rs +++ b/fuzz/fuzz_targets/differential.rs @@ -668,7 +668,7 @@ impl PartialEq for FuzzValue { } } -impl<'a> From<&'a wasmi_reg::Val> for FuzzValue { +impl From<&wasmi_reg::Val> for FuzzValue { fn from(value: &wasmi_reg::Val) -> Self { match value { wasmi_reg::Val::I32(value) => Self::I32(*value), @@ -680,7 +680,7 @@ impl<'a> From<&'a wasmi_reg::Val> for FuzzValue { } } -impl<'a> From<&'a wasmi_stack::Value> for FuzzValue { +impl From<&wasmi_stack::Value> for FuzzValue { fn from(value: &wasmi_stack::Value) -> Self { match value { wasmi_stack::Value::I32(value) => Self::I32(*value), @@ -692,7 +692,7 @@ impl<'a> From<&'a wasmi_stack::Value> for FuzzValue { } } -impl<'a> From<&'a wasmtime::Val> for FuzzValue { +impl From<&wasmtime::Val> for FuzzValue { fn from(value: &wasmtime::Val) -> Self { match value { wasmtime::Val::I32(value) => Self::I32(*value),