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

Fix bug in iter::Chain::size_hint #63691

Merged
merged 1 commit into from
Aug 20, 2019
Merged

Fix bug in iter::Chain::size_hint #63691

merged 1 commit into from
Aug 20, 2019

Conversation

timvermeulen
Copy link
Contributor

Chain::size_hint currently ignores self.state, which means that the size hints of the underlying iterators are always combined regardless of the iteration state. This, of course, should only happen when the state is ChainState::Both.

@rust-highfive
Copy link
Collaborator

r? @shepmaster

(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 Aug 18, 2019
@Centril
Copy link
Contributor

Centril commented Aug 18, 2019

r? @scottmcm

@rust-highfive rust-highfive assigned scottmcm and unassigned shepmaster Aug 18, 2019
@scottmcm
Copy link
Member

Nice catch!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Aug 20, 2019

📌 Commit ec54340 has been approved by scottmcm

@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 Aug 20, 2019
Centril added a commit to Centril/rust that referenced this pull request Aug 20, 2019
…ttmcm

Fix bug in iter::Chain::size_hint

`Chain::size_hint` currently ignores `self.state`, which means that the size hints of the underlying iterators are always combined regardless of the iteration state. This, of course, should only happen when the state is `ChainState::Both`.
Centril added a commit to Centril/rust that referenced this pull request Aug 20, 2019
…ttmcm

Fix bug in iter::Chain::size_hint

`Chain::size_hint` currently ignores `self.state`, which means that the size hints of the underlying iterators are always combined regardless of the iteration state. This, of course, should only happen when the state is `ChainState::Both`.
Centril added a commit to Centril/rust that referenced this pull request Aug 20, 2019
…ttmcm

Fix bug in iter::Chain::size_hint

`Chain::size_hint` currently ignores `self.state`, which means that the size hints of the underlying iterators are always combined regardless of the iteration state. This, of course, should only happen when the state is `ChainState::Both`.
Centril added a commit to Centril/rust that referenced this pull request Aug 20, 2019
…ttmcm

Fix bug in iter::Chain::size_hint

`Chain::size_hint` currently ignores `self.state`, which means that the size hints of the underlying iterators are always combined regardless of the iteration state. This, of course, should only happen when the state is `ChainState::Both`.
bors added a commit that referenced this pull request Aug 20, 2019
Rollup of 7 pull requests

Successful merges:

 - #63216 (avoid unnecessary reservations in std::io::Take::read_to_end)
 - #63265 (Implement `nth_back` for ChunksExactMut)
 - #63691 (Fix bug in iter::Chain::size_hint)
 - #63722 (Don't use stage naming in RUSTFLAGS environment variables)
 - #63723 (Consolidate sigemptyset workarounds)
 - #63736 (Restore the rustc_plugin crate in the sysroot)
 - #63743 (Allow git to merge `Cargo.lock`)

Failed merges:

r? @ghost
@bors bors merged commit ec54340 into rust-lang:master Aug 20, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants