Better HN
top
new
best
ask
show
jobs
Log in
Sign up
Better HN
Comment
by
veddan
· 7mo ago · 0 comments
I think it should be possible to get rid of the Option tag without introducing any unsafe code by changing index in Gc from u32 to std::num::NonZero<u32>.
Comments
[–]
jagged-chisel
7mo ago
An index of 0 is valid if the collection has any content. This doesn’t solve an out-of-bounds issue with the index (i.e. an index that’s too high)