-
Notifications
You must be signed in to change notification settings - Fork 13.6k
Closed
Closed
Copy link
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 toolsA-iteratorsArea: IteratorsArea: IteratorsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.
Description
The documentation of std::iter::Take
gives no information about what happens if the underlying iterator yields less elements than Take
should take.
Does it return less than n
elements, does it panic, ...
Maybe we should change
An iterator that only iterates over the first
n
iterations ofiter
.
to something like
An iterator that only iterates over the first
n
iterations ofiter
. Ifiter
yields less elements thann
, only the amount of elements produced byiter
will be returned.
However english is not my mother tongue and I'm pretty sure there is a much better formulation than this (even to my ears this sounds clumsy)^^
wschella and schneiderfelipe
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 toolsA-iteratorsArea: IteratorsArea: IteratorsC-enhancementCategory: An issue proposing an enhancement or a PR with one.Category: An issue proposing an enhancement or a PR with one.T-libs-apiRelevant to the library API team, which will review and decide on the PR/issue.Relevant to the library API team, which will review and decide on the PR/issue.