3 ms·
Though, in idiomatic Rust I did not find the use of unsigned as mentioned in the article, signed for indexes is the norm.
by cies 5y ago
Though, in idiomatic Rust I did not find the use of unsigned as mentioned in the article, signed for indexes is the norm.
- tialaramex 5y ago> in idiomatic Rust I did not find the use of unsigned as mentioned in the article, signed for indexes is the norm Huh? If you write things[n] in Rust, and n isn't usize that's an error, you can't index things with the other primitive types at all out of the box.
- berkut 5y agoWait, what? Pretty much everything for indices (at least in the stdlib) seems to be 'usize' in my experience (i.e. Vec), which is unsigned. Am I missing something?