Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Fix missing Result handling in getrandom registration example #200

Closed
wants to merge 1 commit into from

Conversation

voronor
Copy link
Contributor

@voronor voronor commented Dec 28, 2024

issue in the Providing Randomness section of the documentation. The example code for registering a custom RNG handler using getrandom::register_custom_getrandom! is missing the proper handling of the Result returned by this macro.

the line:

getrandom::register_custom_getrandom!(custom_getrandom);

should be updated to:

getrandom::register_custom_getrandom!(custom_getrandom)?;

this ensures that any potential errors are properly propagated.
i've corrected this to align with best practices and avoid confusion for developers integrating this into their code.

Thanks for maintaining this resource—it’s incredibly helpful! Let me know if you’d like further adjustments.

@ma2bd
Copy link
Contributor

ma2bd commented Dec 28, 2024

Thanks. Let me check. This is related to #184

@ma2bd
Copy link
Contributor

ma2bd commented Dec 28, 2024

@ma2bd ma2bd closed this Dec 28, 2024
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.

2 participants