mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-23 18:21:13 +08:00
chore: 清理 oxide_vm clippy 告警
This commit is contained in:
@@ -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);
|
||||
|
||||
@@ -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> {
|
||||
|
||||
Reference in New Issue
Block a user