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

Conversation

@timvermeulen
Copy link
Contributor

commented Aug 18, 2019

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

This comment has been minimized.

Copy link
Collaborator

commented Aug 18, 2019

r? @shepmaster

(rust_highfive has picked a reviewer for you, use r? to override)

@Centril

This comment has been minimized.

Copy link
Member

commented Aug 18, 2019

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

@scottmcm

This comment has been minimized.

Copy link
Member

commented Aug 20, 2019

Nice catch!

@bors r+ rollup

@bors

This comment has been minimized.

Copy link
Contributor

commented Aug 20, 2019

📌 Commit ec54340 has been approved by scottmcm

Centril added a commit to Centril/rust that referenced this pull request Aug 20, 2019
Rollup merge of rust-lang#63691 - timvermeulen:chain-size-hint, r=sco…
…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
Rollup merge of rust-lang#63691 - timvermeulen:chain-size-hint, r=sco…
…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
Rollup merge of rust-lang#63691 - timvermeulen:chain-size-hint, r=sco…
…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
Rollup merge of rust-lang#63691 - timvermeulen:chain-size-hint, r=sco…
…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
Auto merge of #63744 - Centril:rollup-g4l3ra9, r=Centril
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

4 checks passed

pr Build #20190818.21 succeeded
Details
pr (Linux mingw-check) Linux mingw-check succeeded
Details
pr (Linux x86_64-gnu-llvm-6.0) Linux x86_64-gnu-llvm-6.0 succeeded
Details
pr (LinuxTools) LinuxTools succeeded
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
6 participants
You can’t perform that action at this time.