Skip to content

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
@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.

2 participants