Skip to content

Commit 16ed56a

Browse files
committed
chore: clippy happy
1 parent 7dfbdb1 commit 16ed56a

2 files changed

Lines changed: 3 additions & 5 deletions

File tree

‎pd-vm/src/compiler/frontends/lua.rs‎

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -560,10 +560,8 @@ fn emit_lua_direct_stmt(stmt: Stmt, root: &mut Vec<Stmt>, blocks: &mut [LuaDirec
560560
} => {
561561
if *in_else {
562562
else_branch.push(stmt);
563-
} else {
564-
if let Some((_, branch_body)) = branches.get_mut(*active_branch) {
565-
branch_body.push(stmt);
566-
}
563+
} else if let Some((_, branch_body)) = branches.get_mut(*active_branch) {
564+
branch_body.push(stmt);
567565
}
568566
}
569567
LuaDirectBlock::While { body, .. }

‎pd-vm/src/vm/jit/native/cranelift.rs‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ pub(crate) fn compile_trace(
211211

212212
if let Some(interval) = fuel_check_interval {
213213
let stride = interval as usize;
214-
if step_index % stride == 0 {
214+
if step_index.is_multiple_of(stride) {
215215
let remaining = trace.steps.len().saturating_sub(step_index);
216216
let chunk_len = remaining.min(stride) as u32;
217217
if check_runtime_fuel_enabled {

0 commit comments

Comments
 (0)