Skip to content

Remove anyerror where easily possible and add a check for it to the format checker - #3059

Merged
IntegratedQuantum merged 2 commits into
PixelGuys:masterfrom
IntegratedQuantum:avoid_anyerror
May 9, 2026
Merged

IntegratedQuantum merged 2 commits into
PixelGuys:masterfrom
IntegratedQuantum:avoid_anyerror

Conversation

@IntegratedQuantum

Copy link
Copy Markdown
Member

I removed all but 2 use-cases of anyerror:

  • fmt.zig which uses it to runtime-print any error string, this is a legitimate use-cases
  • protocols.zig where anyerror has been used for too long and it would be a pain to transition

To avoid having any more discussions about this in future reviews, I decided to add a check for it to the little format script

fixes #2813

@IntegratedQuantum
IntegratedQuantum merged commit 1e8f1cd into PixelGuys:master May 9, 2026
1 check passed
@IntegratedQuantum
IntegratedQuantum deleted the avoid_anyerror branch May 9, 2026 14:03
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.

Audit uses of anyerror

1 participant