2 ms·
It could be a pedantic lint (off by default). There may be ways to lint in case of an `if x.len()... x[...]` though. That should be done monadically; given tha
by Manishearth 11y ago
It could be a pedantic lint (off by default).
There may be ways to lint in case of an `if x.len()... x[...]` though. That should be done monadically; given that panics aren't supposed to be caught in most situations, we should minimize the number of ways programmer error can lead to a panic.
Looking through servo's code a lot of the cases are where we use fixed-length arrays, or when dealing with graphicsy buffers. One use case which needs indexing is when we use an index as an "id". No easy way to fix that without introducing Rc or something.