mirror of
https://github.com/RustPython/RustPython.git
synced 2026-06-02 19:39:49 +09:00
Clippy
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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}");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user