diff options
| author | Mark Rowe <mrowe@bdash.net.nz> | 2025-05-27 12:06:03 -0700 |
|---|---|---|
| committer | Mason Reed <mason@vector35.com> | 2025-05-30 19:17:10 -0400 |
| commit | 4e8060d23deec18f5b6985b918d7163f65c01e32 (patch) | |
| tree | f8e6b204a11721526e2a4557b1eee90959efea69 /rust/src/low_level_il | |
| parent | 82a211d4312a7ce1dd3e3800b15648620c65f48b (diff) | |
[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.
Diffstat (limited to 'rust/src/low_level_il')
| -rw-r--r-- | rust/src/low_level_il/block.rs | 14 |
1 files changed, 1 insertions, 13 deletions
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<M, F> 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, |
