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

Skip to content

Conversation

@DaniRey
Copy link
Contributor

@DaniRey DaniRey commented Nov 30, 2022

This answers the typical beginner question when working with ZIO and resources "how do I do try-with-resource in ZIO"

This answers the typical beginner question when working with ZIO and resources "how do I do try-with-resource in ZIO"
adamgfraser
adamgfraser previously approved these changes Nov 30, 2022
Copy link
Contributor

@adamgfraser adamgfraser left a comment

Choose a reason for hiding this comment

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

Thank you! 🙏

@adamgfraser adamgfraser reopened this Nov 30, 2022
only readAllBytes should be limited to IOException, FileInputStream might return a FileNotFoundException
@DaniRey
Copy link
Contributor Author

DaniRey commented Nov 30, 2022

I adapted the PR a bit, to use attemptBlocking instead of attemptBlockingIO when opening the FileInputStream

I believe the failing zio.test.RandomSpec is not caused by my change, otherwise I'm happy to learn how I managed to break it.

@adamgfraser adamgfraser merged commit 0665d04 into zio:series/2.x Dec 2, 2022
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