Skip to content

Conversation

@josephlr
Copy link
Member

Fixes #44 and removes use of unsafe code.

This can be implemented without unsafe because &'_ File implements Read, indicating that files can be read by multiple readers at the same time.

@josephlr
Copy link
Member Author

Tested on Linux with and without getrandom syscall enabled.

@newpavlov
Copy link
Member

TIL about &File implementing Read. :)

@newpavlov newpavlov merged commit 11eefaa into rust-random:master Jun 29, 2019
@josephlr josephlr deleted the fd branch June 29, 2019 00:13
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.

Shared file descriptor is closed prematurely

2 participants