Skip to content

Commit

Permalink
Rollup merge of rust-lang#128655 - joboet:play_with_the_dice, r=Chris…
Browse files Browse the repository at this point in the history
…Denton

std: refactor UNIX random data generation

This PR makes a number of changes to the UNIX randomness implementation:
* Use `io::Error` for centralized error handling
* Move the file-fallback logic out of the `getrandom`-specific module
* Stop redefining the syscalls on macOS and DragonFly, they have appeared in `libc`
* Add a `OnceLock` to cache the random device file descriptor
  • Loading branch information
matthiaskrgr authored Aug 13, 2024
2 parents c5e8189 + a367a12 commit c39d90e
Showing 1 changed file with 137 additions and 173 deletions.
Loading

0 comments on commit c39d90e

Please sign in to comment.