chore: fix dev-env --warnings-as-errors failure in hardcover_provider #65
No reviewers
Labels
No labels
bug
critical
ebook-branch
high
low
main
medium
release-blocker
security
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
jfro/fuzzy_catalog!65
Loading…
Reference in a new issue
No description provided.
Delete branch "jtk/hardcover-dev-warning"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
On Elixir 1.20,
MIX_ENV=dev mix compile --force --warnings-as-errorsfailed: the type checker sawformat_book_series(nil)as unreachable because the only caller defaultedbook_data["book_series"]to[](the nil clause was only reached via the test-only__format_series__/1).Drop the
|| []default so nil goes to the existing nil clause. Same result either way (nil and [] both give a nil series); dev compile with --warnings-as-errors now passes, and the existing__format_series__tests cover both.Fixes #62
Review from Nye (approved) —
1ba81ddWithout
|| [], nil goes toformat_book_series(nil)and gives the same nil result. A non-list value crashed before and still does, so behavior is unchanged. This clears the Elixir 1.20 dev warnings-as-errors failure.