Open kitcatier opened 1 year ago
https://github.com/GuillaumeGomez/rust-GSL/blob/234cfc26deef8b096e5e8c6a34e0463f5e89bc74/src/randist/bernoulli.rs#L7-L9 Hello, it is not a good choice to mark the entire function body as unsafe, which will make the caller ignore the safety requirements that the function parameters must guarantee, the developer who calls the bernoulli_pdf function may not notice this safety requirement.
Marking them unsafe also means that callers must make sure they know what they're doing.
So I have a few questions:
gsl_ran_bernoulli_pdf
https://github.com/GuillaumeGomez/rust-GSL/blob/234cfc26deef8b096e5e8c6a34e0463f5e89bc74/src/randist/bernoulli.rs#L7-L9 Hello, it is not a good choice to mark the entire function body as unsafe, which will make the caller ignore the safety requirements that the function parameters must guarantee, the developer who calls the bernoulli_pdf function may not notice this safety requirement.
Marking them unsafe also means that callers must make sure they know what they're doing.