Skip to content

Add overflow checking for str::get with inclusive ranges - #42428

Merged
bors merged 2 commits into
rust-lang:masterfrom
scottmcm:str-get-overflow
Jun 14, 2017
Merged

Add overflow checking for str::get with inclusive ranges#42428
bors merged 2 commits into
rust-lang:masterfrom
scottmcm:str-get-overflow

Conversation

@scottmcm

Copy link
Copy Markdown
Member

Fixes#42401

Two commits here:

  1. The first makes str::index just call SliceIndex<str>::index. It's intended to have no behavior change, except where the two methods were inconsistent.
  2. The second actually adds the overflow checking to get(_mut) (and tests for it)

Move any extra logic that the former had into the latter, so they're consistent.
@rust-highfive

Copy link
Copy Markdown
Contributor

r? @aturon

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

@carols10centscarols10cents added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jun 5, 2017
@arielb1

Copy link
Copy Markdown
Contributor

Thanks for the PR @scottmcm! @aturon (or someone else) should be reviewing your PR soon.

@carols10cents

Copy link
Copy Markdown
Member

Aturon's on vacation this week, sorry this fell through the cracks last week! Let's try...

r? @nikomatsakis

@arielb1

arielb1 commented Jun 12, 2017

Copy link
Copy Markdown
Contributor

Let's keep this in the libs team

r? @sfackler

@arielb1arielb1 assigned sfackler and unassigned nikomatsakisJun 12, 2017
@sfackler

Copy link
Copy Markdown
Member

@bors r+

@bors

bors commented Jun 13, 2017

Copy link
Copy Markdown
Collaborator

📌 Commit 808a08a has been approved by sfackler

frewsxcv added a commit to frewsxcv/rust that referenced this pull request Jun 13, 2017
Add overflow checking for `str::get` with inclusive ranges
Fixesrust-lang#42401
Two commits here:
1. The first makes `str::index` just call `SliceIndex<str>::index`. It's intended to have no behavior change, except where the two methods were inconsistent.
2. The second actually adds the overflow checking to `get(_mut)` (and tests for it)
@frewsxcvfrewsxcv mentioned this pull request Jun 13, 2017
bors added a commit that referenced this pull request Jun 14, 2017
Rollup of 6 pull requests
- Successful merges: #42408, #42428, #42496, #42597, #42636, #42638
- Failed merges: #42612
@bors

bors commented Jun 14, 2017

Copy link
Copy Markdown
Collaborator

⌛ Testing commit 808a08a with merge e40ef96...

@bors
bors merged commit 808a08a into rust-lang:masterJun 14, 2017
@scottmcm
scottmcm deleted the str-get-overflow branch June 21, 2017 07:31
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-reviewStatus: Awaiting review from the assignee but also interested parties.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants

@scottmcm@rust-highfive@arielb1@carols10cents@sfackler@bors@nikomatsakis@aturon