From 26abf1a8590a188e7249917d1dce189b8e52bbfe Mon Sep 17 00:00:00 2001 From: "Joseph T. Lyons" Date: Sat, 7 Dec 2024 15:11:04 -0500 Subject: [PATCH] WIP --- src/lenient_parse/internal/build.gleam | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lenient_parse/internal/build.gleam b/src/lenient_parse/internal/build.gleam index 9711a83..8932604 100644 --- a/src/lenient_parse/internal/build.gleam +++ b/src/lenient_parse/internal/build.gleam @@ -49,6 +49,7 @@ pub fn float_value( ) case decimal |> pilkku.to_float { + // `pilkku.to_float` returns 0.0 for both 0.0 and -0.0 Ok(float_value) if float_value == 0.0 && !is_positive -> Ok(-0.0) Ok(float_value) -> Ok(float_value) Error(_) -> { @@ -153,4 +154,3 @@ fn integer_string( False -> "-" <> integer_string } } -// TODO: Unify the code between build_int and build_float