News for hackers. Stuff that matters.
Re:Vec<T> by tialaramex on Thursday October 09, 2025 @03:26PM (#45532004)
However, Rust does automatically provide a niche if you make a simple enumeration which doesn't occupy all bit patterns and we don't need compiler-only features, or even unstable Rust, this Just Works™.

If you have a USHoliday enum, with values like Juneteenth the fact is there's not that many US national holidays, so both USHoliday and Option<USHoliday> will be the same size, one byte with no extra work.

There are no comments on this comment yet.