Closed
Description
Location
https://doc.rust-lang.org/std/primitive.slice.html#method.windows
Summary
The documentation only shows an example with windows
of size 2 and an example with windows of size 3
, but the resulting slice is mutated and it woudl be hard to understand what exactly windows
returns. For example, my previous assumption was that there was an overlap of only one element and not size - 1
. An example with window size larger than 2 would help avoid this confusion.