Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix matching on +0.0 from Erlang/OTP 27+ warnings #23

Merged
merged 1 commit into from
Sep 30, 2024

Conversation

elfenlaid
Copy link
Contributor

The changes fix the following warnings:

warning: pattern matching on 0.0 is equivalent to matching only on +0.0 from Erlang/OTP 27+. Instead you must match on +0.0 or -0.0
└─ lib/topo/point_ring.ex: Topo.PointRing.count_crossing/2

warning: pattern matching on 0.0 is equivalent to matching only on +0.0 from Erlang/OTP 27+. Instead you must match on +0.0 or -0.0
└─ lib/topo/point_ring.ex: Topo.PointRing.count_crossing/2

The suggested way to fix them is discussed here: https://elixirforum.com/t/inconsistency-with-compiler-warnings-upgrading-to-1-17/64209/4

regardless of the OTP version:

  • if you want to match on any zero, use x == 0

@pkinney pkinney merged commit b432f35 into pkinney:master Sep 30, 2024
5 checks passed
@pkinney
Copy link
Owner

pkinney commented Sep 30, 2024

Thank you, @elfenlaid !

@pkinney
Copy link
Owner

pkinney commented Sep 30, 2024

Published as 1.0.2

@elfenlaid
Copy link
Contributor Author

Amazing, thank you! 🙇

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants