chore: 清理 oxide_vm clippy 告警

This commit is contained in:
2026-08-14 05:26:46 +08:00
parent d6eee1347c
commit 7362137720
14 changed files with 29 additions and 36 deletions
+3 -6
View File
@@ -273,12 +273,9 @@ impl Vm {
let a = lv.as_int();
let b = rv.as_int();
if b != 0 {
match a.checked_rem(b) {
Some(v) => {
self.regs[rd] = JsValue::int(v);
return Ok(());
}
None => {}
if let Some(v) = a.checked_rem(b) {
self.regs[rd] = JsValue::int(v);
return Ok(());
}
}
self.regs[rd] = JsValue::float(a as f64 % b as f64);
+1
View File
@@ -256,6 +256,7 @@ impl Vm {
Ok(())
}
#[allow(clippy::too_many_arguments)]
fn dispatch_compound_member_shift(
&mut self, op_name: &str, rd: usize, a: usize, b: usize, error_msg: &str, is_right: bool, is_unsigned: bool,
) -> Result<(), String> {