Skip to content

Remove unreachable valid_ip_address?/1 clause - #35

Merged
adam12 merged 1 commit into
masterfrom
fix-inet-clause-warning
Jun 10, 2026
Merged

adam12 merged 1 commit into
masterfrom
fix-inet-clause-warning

Conversation

@adam12

@adam12 adam12 commented Jun 10, 2026

Copy link
Copy Markdown
Owner

Elixir 1.20's stricter clause-reachability analysis flags the valid_ip_address?(_) fallback at lib/ecto_network/inet.ex:136 as never used. The sole caller (cast/1) is already guarded by when is_tuple(address), so the is_tuple/1 clause always matches and the fallback is dead code. Removing it silences the warning; all 20 tests still pass on 1.20.1.

@adam12
adam12 force-pushed the fix-inet-clause-warning branch from d3098db to 79d1ed7 Compare June 10, 2026 01:43
@adam12
adam12 merged commit 25211f8 into master Jun 10, 2026
2 checks passed
@adam12
adam12 deleted the fix-inet-clause-warning branch June 10, 2026 01:46
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.

1 participant