Skip to content

some more clippy-based improvements #28287

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 5 commits into from
Sep 8, 2015
Merged

some more clippy-based improvements #28287

merged 5 commits into from
Sep 8, 2015

Conversation

llogiq
Copy link
Contributor

@llogiq llogiq commented Sep 7, 2015

It's a large number of small improvements to the code, mostly readability-related, but removing closures and replacing str::to_string() with .to_owned() should also positively affect performance.

r? @Manishearth (once it compiles, of course 😄)

@@ -1228,8 +1228,8 @@ impl Index<usize> for Json {
type Output = Json;

fn index<'a>(&'a self, idx: usize) -> &'a Json {
Copy link
Member

Choose a reason for hiding this comment

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

No elision?

@llogiq
Copy link
Contributor Author

llogiq commented Sep 7, 2015

I didn't do all the elision things yet. We can wrap them up in the next PR.

I'd have thought that the types of the slice::Split would have been inferred, but this appears not to be the case. Reverted this one change.
@llogiq
Copy link
Contributor Author

llogiq commented Sep 8, 2015

@Manishearth r? I may add more stuff in later PRs.

@Manishearth
Copy link
Member

@bors r+ rollup

@bors
Copy link
Collaborator

bors commented Sep 8, 2015

📌 Commit d956e63 has been approved by Manishearth

@bors
Copy link
Collaborator

bors commented Sep 8, 2015

⌛ Testing commit d956e63 with merge b2b6c6b...

bors added a commit that referenced this pull request Sep 8, 2015
It's a large number of small improvements to the code, mostly readability-related, but removing closures and replacing `str::to_string()` with `.to_owned()` should also positively affect performance.

r? @Manishearth (once it compiles, of course 😄)
@bors bors merged commit d956e63 into rust-lang:master Sep 8, 2015
@llogiq llogiq deleted the clippy branch September 8, 2015 16:19
@llogiq
Copy link
Contributor Author

llogiq commented Sep 8, 2015

Yay! 😄

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