std: refactor UNIX random data generation · patricklam/verify-rust-std@59436fc (original) (raw)

Skip to content

Provide feedback

Saved searches

Use saved searches to filter your results more quickly

Sign up

Appearance settings

Commit 59436fc

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

File tree

1 file changed

lines changed

1 file changed

lines changed