style: 自动格式化

This commit is contained in:
2026-10-18 13:33:14 +00:00
parent 45d299282b
commit 7167d30bab
+9 -3
View File
@@ -205,19 +205,25 @@ impl Vm {
}
}
fn member_op_f64(&mut self, prop_val: JsValue, rhs: JsValue, op: impl FnOnce(f64, f64) -> f64) -> Result<JsValue, String> {
fn member_op_f64(
&mut self, prop_val: JsValue, rhs: JsValue, op: impl FnOnce(f64, f64) -> f64,
) -> Result<JsValue, String> {
let ln = self.coerce_number_bounded(prop_val)?;
let rn = self.coerce_number_bounded(rhs)?;
Ok(JsValue::float(op(ln, rn)))
}
fn member_op_i32(&mut self, prop_val: JsValue, rhs: JsValue, op: impl FnOnce(i32, i32) -> i32) -> Result<JsValue, String> {
fn member_op_i32(
&mut self, prop_val: JsValue, rhs: JsValue, op: impl FnOnce(i32, i32) -> i32,
) -> Result<JsValue, String> {
let ln = self.coerce_int32_bounded(prop_val)?;
let rn = self.coerce_int32_bounded(rhs)?;
Ok(JsValue::int(op(ln, rn)))
}
fn member_op_shift(&mut self, prop_val: JsValue, rhs: JsValue, is_right: bool, is_unsigned: bool) -> Result<JsValue, String> {
fn member_op_shift(
&mut self, prop_val: JsValue, rhs: JsValue, is_right: bool, is_unsigned: bool,
) -> Result<JsValue, String> {
let ln = self.coerce_int32_bounded(prop_val)?;
let shift = self.coerce_uint32_bounded(rhs)? & 0x1F;
Ok(if !is_right {