-
-
Notifications
You must be signed in to change notification settings - Fork 14.8k
[libs] Add Read::take_while #70920
Copy link
Copy link
Open
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.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.
Metadata
Metadata
Assignees
Labels
C-feature-requestCategory: A feature request, i.e: not implemented / a PR.Category: A feature request, i.e: not implemented / a PR.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.
Type
Fields
Give feedbackNo fields configured for issues without a type.
In #70772 I proposed adding
BufRead::read_while. But as @HeroicKatora pointed out in #70772 (comment)Read::take_whilewould achieve many of the same benefits with fewer downsides. This would act as a counterpart toRead::take, similar toIterator::take_while.Examples