Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# Changelog

## Unreleased

- Fixed deprecation warnings when using OTP 29

## v1.0.1 - 2026-05-14

- Fixed a bug where `uri.parse_query` would not correctly decode all `+`
Expand Down
9 changes: 6 additions & 3 deletions src/gleam_stdlib.erl
Original file line number Diff line number Diff line change
Expand Up @@ -72,21 +72,24 @@ tuple_get(Data, Index) when Index >= tuple_size(Data) -> {error, nil};
tuple_get(Data, Index) -> {ok, element(Index + 1, Data)}.

int_from_base_string(String, Base) ->
case catch binary_to_integer(String, Base) of
try binary_to_integer(String, Base) of
Int when is_integer(Int) -> {ok, Int};
_ -> {error, nil}
catch _:_ -> {error, nil}
end.

parse_int(String) ->
case catch binary_to_integer(String) of
try binary_to_integer(String) of
Int when is_integer(Int) -> {ok, Int};
_ -> {error, nil}
catch _:_ -> {error, nil}
end.

parse_float(String) ->
case catch binary_to_float(String) of
try binary_to_float(String) of
Float when is_float(Float) -> {ok, Float};
_ -> {error, nil}
catch _:_ -> {error, nil}
end.

less_than(Lhs, Rhs) ->
Expand Down
Loading