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 panic on string slicing error to truncate the string #32064

Merged
merged 1 commit into from
Mar 7, 2016

Conversation

bluss
Copy link
Member

@bluss bluss commented Mar 5, 2016

Fix panic on string slicing error to truncate the string

The string may be arbitrarily long, but we want to limit the panic
message to a reasonable length. Truncate the string if it is too long
(simply to char boundary).

Also add details to the start <= end message. I think it's ok to flesh
out the code here, since it's in a cold function.

Fixes #32063

The string may be arbitrarily long, but we want to limit the panic
message to a reasonable length. Truncate the string if it is too long
(simply to char boundary).

Also add details to the start <= end message. I think it's ok to flesh
out the code here, since it's in a cold function.
@alexcrichton
Copy link
Member

@bors: r+ 4594f0f

Thanks!

@alexcrichton alexcrichton self-assigned this Mar 6, 2016
@bors
Copy link
Contributor

bors commented Mar 7, 2016

⌛ Testing commit 4594f0f with merge 6eb81a1...

bors added a commit that referenced this pull request Mar 7, 2016
Fix panic on string slicing error to truncate the string

The string may be arbitrarily long, but we want to limit the panic
message to a reasonable length. Truncate the string if it is too long
(simply to char boundary).

Also add details to the start <= end message. I think it's ok to flesh
out the code here, since it's in a cold function.

Fixes #32063
@bors bors merged commit 4594f0f into rust-lang:master Mar 7, 2016
@bluss bluss deleted the str-slice-panic branch March 7, 2016 04:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants