style: 修复 clippy --all-targets 告警

This commit is contained in:
爱特每羊队
2026-06-30 15:18:13 +08:00
parent 26839db07b
commit 5feba7c20d
5 changed files with 129 additions and 128 deletions
@@ -55,7 +55,9 @@ fn parse_int_hex() {
fn parse_float_decimal() {
let mut vm = Vm::new();
let result = eval(&mut vm, "parseFloat('3.14')").unwrap();
assert!((result.as_double() - 3.14).abs() < 0.001);
#[allow(clippy::approx_constant)]
let expected = 3.14;
assert!((result.as_double() - expected).abs() < 0.001);
}
#[test]