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

Export UniformOrdered #134

Merged
merged 3 commits into from
Aug 17, 2023
Merged

Export UniformOrdered #134

merged 3 commits into from
Aug 17, 2023

Conversation

MathisWellmann
Copy link
Contributor

@MathisWellmann MathisWellmann commented Aug 11, 2023

I'd like to be able to access UniformOrdered from the impl_rand module. I'm not sure why the struct is not exposed by default, but this PR allows for that.
I can imagine why the impl_rand module is not public, but I wonder what the proper way would be for this crate to expose UniformOrdered.
Any pointer are appreciated

@mbrubeck
Copy link
Collaborator

Thanks for the patch! I believe you will also need to add documentation comments to the module and its public structs. Feel free to use simple one-liners, like "Uniform random sampler for OrderedFloat".

@mbrubeck
Copy link
Collaborator

You could also add something like this to the top of lib.rs:

#[cfg(feature = "rand")]
pub use impl_rand::{UniformNotNan, UniformOrdered};

if you want to expose the structs while keeping the module private.

@MathisWellmann
Copy link
Contributor Author

Thanks for the input! I decided to go with the second option which is very nice.

@mbrubeck mbrubeck merged commit d64c3c3 into reem:master Aug 17, 2023
2 checks passed
@mbrubeck mbrubeck changed the title Make impl_rand public Export UniformNotNan and UniformOrdered Aug 17, 2023
@mbrubeck
Copy link
Collaborator

Thanks!

@mbrubeck mbrubeck changed the title Export UniformNotNan and UniformOrdered Export UniformOrdered Aug 17, 2023
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.

None yet

2 participants