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

document fromAutoClosable #7575

Merged
merged 4 commits into from
Dec 2, 2022
Merged

document fromAutoClosable #7575

merged 4 commits into from
Dec 2, 2022

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.

Co-authored-by: Adam Fraser <adam.fraser@gmail.com>
@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.

None yet

2 participants