Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specialize io::Bytes::size_hint for more types #86202

Merged
merged 1 commit into from
Jun 18, 2021

Conversation

a1phyr
Copy link
Contributor

@a1phyr a1phyr commented Jun 10, 2021

Improve the result of <io::Bytes as Iterator>::size_hint for some readers. I did not manage to specialize SizeHint for io::Cursor

Side question: would it be interesting for io::Read to have an optional size_hint method ?

@rust-highfive
Copy link
Collaborator

r? @m-ou-se

(rust-highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 10, 2021
@m-ou-se
Copy link
Member

m-ou-se commented Jun 17, 2021

Very nice!

@bors r+

@bors
Copy link
Contributor

bors commented Jun 17, 2021

📌 Commit 2cbd5d1 has been approved by m-ou-se

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 17, 2021
@m-ou-se m-ou-se added A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 17, 2021
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 17, 2021
Rollup of 6 pull requests

Successful merges:

 - rust-lang#85925 (Linear interpolation)
 - rust-lang#86202 (Specialize `io::Bytes::size_hint` for more types)
 - rust-lang#86357 (Rely on libc for correct integer types in os/unix/net/ancillary.rs.)
 - rust-lang#86388 (Make `s` pre-interned)
 - rust-lang#86401 (Fix ICE when using `#[doc(keyword = "...")]` on non-items)
 - rust-lang#86405 (Add incr-comp note for 1.53.0 relnotes)

Failed merges:

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit b7dd942 into rust-lang:master Jun 18, 2021
@rustbot rustbot added this to the 1.55.0 milestone Jun 18, 2021
@a1phyr a1phyr deleted the spec_io_bytes_size_hint branch March 12, 2024 17:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-io Area: `std::io`, `std::fs`, `std::net` and `std::path` S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants