mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-26 11:41:13 +08:00
style: 修复 clippy --all-targets 告警
This commit is contained in:
@@ -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]
|
||||
|
||||
Reference in New Issue
Block a user