Skip to content

cleanup: &foo[0..a] -> &foo[..a] #21061

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

Merged
merged 1 commit into from
Jan 14, 2015
Merged

cleanup: &foo[0..a] -> &foo[..a] #21061

merged 1 commit into from
Jan 14, 2015

Conversation

japaric
Copy link
Member

@japaric japaric commented Jan 12, 2015

No description provided.

@nrc nrc self-assigned this Jan 12, 2015
@@ -277,7 +277,7 @@ fn print_maybe_styled(w: &mut EmitterWriter,
// to be miscolored. We assume this is rare enough that we don't
// have to worry about it.
if msg.ends_with("\n") {
try!(t.write_str(&msg[0..(msg.len()-1)]));
try!(t.write_str(&msg[..(msg.len()-1)]));
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it'd be great to tidy up some of these unnecessary parens too, if you wanted to do that

bors added a commit that referenced this pull request Jan 14, 2015
@bors bors merged commit c1d48a8 into rust-lang:master Jan 14, 2015
@japaric japaric deleted the range branch January 22, 2015 16:11
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.

4 participants