diff --git a/src/lenient_parse.gleam b/src/lenient_parse.gleam index 8c9cf3a..e50496b 100644 --- a/src/lenient_parse.gleam +++ b/src/lenient_parse.gleam @@ -31,8 +31,8 @@ pub fn to_float(text: String) -> Result(Float, ParseError) { text |> int.parse - |> result.replace_error(GleamIntParseError) |> result.map(int.to_float) + |> result.replace_error(GleamIntParseError) } /// Converts a string to an integer using a more lenient parsing method than gleam's `int.parse()`.