From 4e8060d23deec18f5b6985b918d7163f65c01e32 Mon Sep 17 00:00:00 2001 From: Mark Rowe Date: Tue, 27 May 2025 12:06:03 -0700 Subject: [Rust] Have LowLevelILBlock derive Clone rather than manually implementing it This is possible now that FunctionMutability and FunctionForm require Copy, and fixes an existing clippy warning about the non-canonical implementation of `clone` on a `Copy` type. --- rust/src/low_level_il/block.rs | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'rust/src') diff --git a/rust/src/low_level_il/block.rs b/rust/src/low_level_il/block.rs index fd3e7c81..d3b1f99b 100644 --- a/rust/src/low_level_il/block.rs +++ b/rust/src/low_level_il/block.rs @@ -19,7 +19,7 @@ use crate::basic_block::{BasicBlock, BlockContext}; use super::*; -#[derive(Copy)] +#[derive(Copy, Clone)] pub struct LowLevelILBlock<'func, M, F> where M: FunctionMutability, @@ -63,18 +63,6 @@ where } } -impl Clone for LowLevelILBlock<'_, M, F> -where - M: FunctionMutability, - F: FunctionForm, -{ - fn clone(&self) -> Self { - LowLevelILBlock { - function: self.function, - } - } -} - pub struct LowLevelILBlockIter<'func, M, F> where M: FunctionMutability, -- cgit v1.3.1