From 2c2b13784eea02489a739cf32abfebedfafd9beb Mon Sep 17 00:00:00 2001 From: ShaharNaveh <50263213+ShaharNaveh@users.noreply.github.com> Date: Fri, 23 Jan 2026 15:41:33 +0200 Subject: [PATCH] Clippy --- crates/codegen/src/ir.rs | 6 +++--- examples/dis.rs | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/codegen/src/ir.rs b/crates/codegen/src/ir.rs index 0d2e58900..b1534a4f2 100644 --- a/crates/codegen/src/ir.rs +++ b/crates/codegen/src/ir.rs @@ -742,13 +742,13 @@ fn generate_exception_table(blocks: &[Block], block_to_index: &[u32]) -> Box<[u8 // instr_size includes EXTENDED_ARG instructions let instr_size = instr.arg.instr_size() as u32; - match (¤t_entry, &instr.except_handler) { + match (¤t_entry, instr.except_handler) { // No current entry, no handler - nothing to do (None, None) => {} // No current entry, handler starts - begin new entry (None, Some(handler)) => { - current_entry = Some((handler.clone(), instr_index)); + current_entry = Some((handler, instr_index)); } // Current entry exists, same handler - continue @@ -767,7 +767,7 @@ fn generate_exception_table(blocks: &[Block], block_to_index: &[u32]) -> Box<[u8 curr_handler.stack_depth as u16, curr_handler.preserve_lasti, )); - current_entry = Some((handler.clone(), instr_index)); + current_entry = Some((handler, instr_index)); } // Current entry exists, no handler - finish current entry diff --git a/examples/dis.rs b/examples/dis.rs index 1ca350603..0b6190dde 100644 --- a/examples/dis.rs +++ b/examples/dis.rs @@ -60,7 +60,7 @@ fn main() -> Result<(), lexopt::Error> { for script in &scripts { if script.exists() && script.is_file() { - let res = display_script(script, mode, opts.clone(), expand_code_objects); + let res = display_script(script, mode, opts, expand_code_objects); if let Err(e) = res { error!("Error while compiling {script:?}: {e}"); }