Closed chipshort closed 4 months ago
Hi @chipshort, thanks for spotting this and opening the issue! I have now fixed this, and additionally I have made the panic message match that of Rust's primitives. I think I originally wrote these functions when the primitive ilog*
methods were unstable, so their behaviour must have changed since then. I've pushed these changes to the latest
branch, will merge with master and publish to v0.11.0
soon.
Thanks for the quick fix!
@chipshort I've just published v0.11.0, sorry this took a bit of time to actually get done, it's very busy last few weeks!
No need to appologize. Thanks for creating and maintaining this library!
The unchecked
ilog*
functions in the std crate always panic for inputs <= 0, even in release mode (see also this playground), while the implementation in here only panics in debug mode and returns 0 in release mode.If this is unintended, I'd be happy to open a PR to behave like the Rust primitives.