3 ms·
You wouldn’t have to ‘impl Idx for u8’ if implicit upconversion was a thing. If it was, we could do this with no issues: let idx: u8 = 42; let val = ve
by colejohnson66 4y ago
You wouldn’t have to ‘impl Idx for u8’ if implicit upconversion was a thing. If it was, we could do this with no issues:
let idx: u8 = 42;
let val = vec[idx];
As GP said, the current “solution” is to do ‘idx as usize’ which is verbose.