Skip to content

Commit

Permalink
style: Make clippy happy
Browse files Browse the repository at this point in the history
  • Loading branch information
epage committed Jun 13, 2024
1 parent c383efa commit b310fe9
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions crates/toml_edit/src/parser/numbers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,8 @@ mod test {
("0xF", 15),
("0o0_755", 493),
("0b1_0_1", 5),
(&std::i64::MIN.to_string()[..], std::i64::MIN),
(&std::i64::MAX.to_string()[..], std::i64::MAX),
(&i64::MIN.to_string()[..], i64::MIN),
(&i64::MAX.to_string()[..], i64::MAX),
];
for &(input, expected) in &cases {
dbg!(input);
Expand All @@ -361,7 +361,7 @@ mod test {
} else {
dbg!(expected);
dbg!(actual);
assert!((expected - actual).abs() < std::f64::EPSILON);
assert!((expected - actual).abs() < f64::EPSILON);
}
}

Expand All @@ -376,15 +376,15 @@ mod test {
("-2E-2", -2E-2),
("6.626e-34", 6.626e-34),
("9_224_617.445_991_228_313", 9_224_617.445_991_227),
("-1.7976931348623157e+308", std::f64::MIN),
("1.7976931348623157e+308", std::f64::MAX),
("-1.7976931348623157e+308", f64::MIN),
("1.7976931348623157e+308", f64::MAX),
("nan", f64::NAN.copysign(1.0)),
("+nan", f64::NAN.copysign(1.0)),
("-nan", f64::NAN.copysign(-1.0)),
("inf", f64::INFINITY),
("+inf", f64::INFINITY),
("-inf", f64::NEG_INFINITY),
// ("1e+400", std::f64::INFINITY),
// ("1e+400", f64::INFINITY),
];
for &(input, expected) in &cases {
dbg!(input);
Expand Down

0 comments on commit b310fe9

Please sign in to comment.