mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-28 18:59:04 +08:00
Clippy
This commit is contained in:
1 parent
a9364cbc52
commit
2c2b13784e
2 files changed
+4
-4
No files matched your search
@@ -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
|
||||
|
||||
+1
-1
@@ -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