diff options
Diffstat (limited to 'components/script/dom/bindings/str.rs')
-rw-r--r-- | components/script/dom/bindings/str.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/components/script/dom/bindings/str.rs b/components/script/dom/bindings/str.rs index 3142f011c9b..dfeedc636d6 100644 --- a/components/script/dom/bindings/str.rs +++ b/components/script/dom/bindings/str.rs @@ -734,10 +734,10 @@ fn parse_floating_point_number(input: &str) -> Result<f64, ()> { match input.trim().parse::<f64>() { Ok(val) if !( - // A valid number is the same as what rust considers to be valid, - // except for +1., NaN, and Infinity. - val.is_infinite() || val.is_nan() || input.ends_with(".") || input.starts_with("+") - ) => + // A valid number is the same as what rust considers to be valid, + // except for +1., NaN, and Infinity. + val.is_infinite() || val.is_nan() || input.ends_with(".") || input.starts_with("+") + ) => { // TODO(#19773): need consider `min`, `max`, `step`, when they are implemented Ok(val.round()) |