Skip to content

Commit 6b11682

Browse files
mkuratczykmergify[bot]
authored andcommitted
0.0 doesn't require special handling
Without this change, our tests against OTP master started failing since the negative zero change was introduced, for example: https://github.com/rabbitmq/rabbitmq-server/actions/runs/6141080013/job/16660857916 The warning (treated as error) is: ``` rabbit_numerical.erl:33:8: matching on the float 0.0 will no longer also match -0.0 in OTP 27. If you specifically intend to match 0.0 alone, write +0.0 instead. ``` (cherry picked from commit ded9441)
1 parent 765cfbb commit 6b11682

File tree

1 file changed

+0
-2
lines changed

1 file changed

+0
-2
lines changed

deps/rabbit_common/src/rabbit_numerical.erl

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,8 +30,6 @@
3030
%% human-readable output, or compact ASCII serializations for floats.
3131
digits(N) when is_integer(N) ->
3232
integer_to_list(N);
33-
digits(0.0) ->
34-
"0.0";
3533
digits(Float) ->
3634
{Frac1, Exp1} = frexp_int(Float),
3735
[Place0 | Digits0] = digits1(Float, Exp1, Frac1),

0 commit comments

Comments
 (0)