3 ms·
That makes sense. I've never noticed what the default size was, but because it always worked with indexing, I assumed that it was always usize.
by mmstick 10y ago
That makes sense. I've never noticed what the default size was, but because it always worked with indexing, I assumed that it was always usize.
- Manishearth 10y agoI believe it used to be uint (usize) back in pre-1.0, and IIRC inference didn't work well or wasn't supposed to work at all. I recall needing explicit prefixes on my int literals back then. No longer the case.