some clippy-suggested improvements#3733
Conversation
|
Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (or someone else) soon. If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes. Please see the contribution instructions for more information. |
| // component for the directory name. | ||
| if let Some(triple) = triple { | ||
| path.push(Path::new(triple).file_stem().ok_or(human(format!("target was empty")))?); | ||
| path.push(Path::new(triple).file_stem().ok_or(human("target was empty".to_string()))?); |
There was a problem hiding this comment.
I'm surprised clippy didn't suggest ok_or_else(|| human(…))
There was a problem hiding this comment.
It did, but I didn't fix all of those.
src/cargo/sources/git/utils.rs
Outdated
| })?; | ||
| let refspec = "refs/heads/*:refs/heads/*"; | ||
| fetch(&repo, &url, refspec, &config).chain_error(||{ | ||
| fetch(&repo, url, refspec, &config).chain_error(||{ |
There was a problem hiding this comment.
bonus points: add blank before {
|
@bors: r+ Thanks! |
|
📌 Commit 1e50878 has been approved by |
|
⌛ Testing commit 1e50878 with merge 94f79a8... |
|
💥 Test timed out |
|
@bors: retry
…On Wed, Feb 22, 2017 at 8:59 AM, bors ***@***.***> wrote:
💥 Test timed out
—
You are receiving this because you commented.
Reply to this email directly, view it on GitHub
<#3733 (comment)>, or mute
the thread
<https://github.com/notifications/unsubscribe-auth/AAD95B7jqaFhBSuG7SgiJs0ZPcZsCgElks5rfE1ugaJpZM4MFHym>
.
|
some clippy-suggested improvements This fixes a number of [clippy](https://github.com/Manishearth/rust-clippy) warnings. It's mostly about readability, though a few changes could affect performance (though probably not measurably). I've left out things to fix later; I thought I'd just push the first batch to see if you like it.
|
☀️ Test successful - status-appveyor, status-travis |
This fixes a number of clippy warnings. It's mostly about readability, though a few changes could affect performance (though probably not measurably).
I've left out things to fix later; I thought I'd just push the first batch to see if you like it.