Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@mijicd
Copy link
Member

@mijicd mijicd commented Nov 26, 2020

As mentioned in Discord, the current refineOrDie implementation contains a non-exhaustive match.

@mijicd mijicd requested a review from iravid as a code owner November 26, 2020 11:47
@mijicd mijicd added the stream ZIO Stream label Nov 26, 2020
case None => None
case Some(e) if pf.isDefinedAt(e) => Some(pf.apply(e))
}))
refineOrDieWith(pf)(ev1)
Copy link
Contributor

Choose a reason for hiding this comment

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

In refineOrDieWith wouldn't it be better to use catchAll and die instead of throwing?

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, yes, one sec.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in ae53e05

@adamgfraser adamgfraser merged commit 2b6c459 into zio:master Nov 26, 2020
@mijicd mijicd deleted the hotfix/streams-refine-or-die branch November 26, 2020 15:06
atooni pushed a commit to blended-zio/zio that referenced this pull request Dec 1, 2020
* Write failing test

* Fix refineOrDie

* Align refineOrDieWith's implementation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stream ZIO Stream

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants