Skip to content

Commit

Permalink
std: refactor UNIX random data generation
Browse files Browse the repository at this point in the history
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
joboet committed Aug 4, 2024
1 parent 1813603 commit 59436fc
Showing 1 changed file with 137 additions and 173 deletions.
Loading

0 comments on commit 59436fc

Please sign in to comment.