Hacker News new | ask | show | jobs
by OptionOfT 178 days ago
If you're using Rust you can push it one level further: use a NonZeroU*.

More than that and you'll need nightly for now: https://docs.rs/ranged_integers/latest/ranged_integers/