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

chore(documentation): improve match handler documentation from issue #57

Conversation

acostapazo
Copy link
Contributor

No description provided.

@acostapazo acostapazo linked an issue May 11, 2023 that may be closed by this pull request
3 tasks
Copy link

@Artalus Artalus left a comment

Choose a reason for hiding this comment

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

I would have split 1 commit in 2 - with one solely amending whitespace, and second updating the doc... But that's me, others often distaste my commiting habits 😅

Comment on lines 286 to 287
If are using `Result(success="my_success")` and `Result(failure=NoSuchKey())` syntaxis intead of recommended one
with `Success` and `Failure` alias, you have to use a different match pattern.
Copy link

Choose a reason for hiding this comment

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

  • syntaxis -> syntax ?
  • alias -> aliases ?

Comment on lines 297 to 298
Result("Failure with TypeMismatch")
Copy link

Choose a reason for hiding this comment

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

Suggested change
case Failure(_, TypeMismatch()):
Result("Failure with TypeMismatch")
case Result(_, TypeMismatch()):
print("Failure with TypeMismatch")

@acostapazo acostapazo merged commit c9f3d72 into main May 11, 2023
@acostapazo acostapazo deleted the 56-match-syntax-fails-when-used-with-raw-result-instead-of-failuresuccess branch May 11, 2023 13:58
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.

match syntax fails when used with raw Result instead of Failure/Success
2 participants