This commit is contained in:
ShaharNaveh
2026-01-23 15:41:33 +02:00
parent a9364cbc52
commit 2c2b13784e
2 changed files with 4 additions and 4 deletions

View File

@@ -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 (&current_entry, &instr.except_handler) {
match (&current_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

View File

@@ -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}");
}