Skip to content

Remove one bounds check from BufReader #37696

New issue

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

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

Already on GitHub? # to your account

Merged
merged 1 commit into from
Nov 12, 2016
Merged

Conversation

arthurprs
Copy link
Contributor

Very minor thing. Otherwise the optimizer can't be sure that pos <= cap. Added a paranoid debug_assert to ensure correctness instead.

CC #37573

@rust-highfive
Copy link
Contributor

r? @alexcrichton

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

Otherwise the optimizer can't be sure that pos <= cap. Added a paranoid debug_assert to ensure correctness instead.
@alexcrichton
Copy link
Member

@bors: r+

Nice!

@bors
Copy link
Collaborator

bors commented Nov 10, 2016

📌 Commit dcd80b8 has been approved by alexcrichton

@alexcrichton alexcrichton added the T-libs-api Relevant to the library API team, which will review and decide on the PR/issue. label Nov 10, 2016
@brson brson added the relnotes Marks issues that should be documented in the release notes of the next release. label Nov 11, 2016
eddyb added a commit to eddyb/rust that referenced this pull request Nov 11, 2016
Remove one bounds check from BufReader

Very minor thing. Otherwise the optimizer can't be sure that pos <= cap. Added a paranoid debug_assert to ensure correctness instead.

CC rust-lang#37573
eddyb added a commit to eddyb/rust that referenced this pull request Nov 12, 2016
Remove one bounds check from BufReader

Very minor thing. Otherwise the optimizer can't be sure that pos <= cap. Added a paranoid debug_assert to ensure correctness instead.

CC rust-lang#37573
bors added a commit that referenced this pull request Nov 12, 2016
@bors bors merged commit dcd80b8 into rust-lang:master Nov 12, 2016
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
relnotes Marks issues that should be documented in the release notes of the next release. T-libs-api Relevant to the library API team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants