-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.
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.
gurry
Metadata
Metadata
Assignees
Labels
A-docsArea: Documentation for any part of the project, including the compiler, standard library, and toolsArea: Documentation for any part of the project, including the compiler, standard library, and toolsT-libsRelevant to the library team, which will review and decide on the PR/issue.Relevant to the library team, which will review and decide on the PR/issue.