4 ms·
Yes: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.array_windows https://doc.rust-lang.org/stable/std/primitive.slice.html#me...
by ogoffart 6y ago
Yes: https://doc.rust-lang.org/stable/std/primitive.slice.html#method.array_windows https://doc.rust-lang.org/stable/std/primitive.slice.html#me...
- throwaway894345 6y agoPerfect, that's exactly what I want!
- adrian17 6y agoNote that you don't even need to supply the size, as it'll get deduced: for &[l, r] in data.array_windows() {