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

update pattern-matching doc #165

Merged
merged 2 commits into from
Nov 23, 2022
Merged

update pattern-matching doc #165

merged 2 commits into from
Nov 23, 2022

Conversation

nicolas-besnard
Copy link
Contributor

Hello :)

In my use case, I'm using Success like this Success(json:, viewers_count:), the documentation was missing this use case, so I had some issue finding the right syntax

Let me know if something is not good

@@ -30,6 +30,8 @@ in Success(user: User, account: Account => user_account)
# user_account is bound to the value of the `:account` key
in Success()
# corresponds to Success(Unit)
in Success(user: user, **rest)
Copy link
Member

Choose a reason for hiding this comment

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

better Success(user:, **rest) since the alias == key

@flash-gordon flash-gordon merged commit 66bdc87 into dry-rb:main Nov 23, 2022
@flash-gordon
Copy link
Member

Thanks!

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.

2 participants