Skip to content

Remove unnecessary error branch of ProcessPrng#579

Merged
newpavlov merged 2 commits intorust-random:masterfrom
silverstillisntgold:master
Jan 12, 2025
Merged

Remove unnecessary error branch of ProcessPrng#579
newpavlov merged 2 commits intorust-random:masterfrom
silverstillisntgold:master

Conversation

@silverstillisntgold
Copy link
Contributor

ProcessPrng is guaranteed to never fail during runtime, so there's no need to handle that case. Also found that windows_targets declares all extern functions as pub, so wrapped the link! macro in a local module to prevent it from being accessible outside of windows.rs.

When getrandom increases the MSRV to at least 1.71, the windows-targets crate can be ditched entirely in favor of linking with raw-dylib.

associated cleanup and documentation
@josephlr josephlr added this to the Post 0.3 Release milestone Jan 10, 2025
@newpavlov newpavlov merged commit 9f20e28 into rust-random:master Jan 12, 2025
takumi-earth pushed a commit to earthlings-dev/getrandom that referenced this pull request Jan 27, 2026
ProcessPrng is guaranteed to never fail during runtime, so there's no
need to handle that case. Also found that windows_targets declares all
extern functions as pub, so wrapped the link! macro in a local module to
prevent it from being accessible outside of windows.rs.
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.

3 participants