Skip to content

Conversation

ee7
Copy link
Member

@ee7 ee7 commented Sep 21, 2023

I think that returning an error union here isn't particularly interesting. I think most of the exercises that currently contain (or previously contained) a single-item error set are better if the relevant functions return an optional, or say that it is the caller's responsibility to do input validation.

This PR is a follow-up to 290e7f3, which removed the negative input test case.

Note that we should be able to add the "bad input" tests again in the future - Zig plans to give std.testing the ability to expect a panic.

Merging this PR will break everybody's solution.

Refs: #229

Similar to #335


To-do:

  • Check whether we should add an .append file that explains how to assert

@ee7 ee7 requested a review from booniepepper September 21, 2023 11:36
@ee7 ee7 self-assigned this Oct 5, 2023
Copy link
Member

@kotp kotp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me, not tested locally.

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.

3 participants