Uh oh!
There was an error while loading. Please reload this page.
A few cleanups and minor improvements to typeck/check - #54533
Merged
Conversation
rust-highfive
commented
Sep 24, 2018
Contributor
r? @davidtwco (rust_highfive has picked a reviewer for you, use r? to override) |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ljedrzforce-pushed
the
cleanup_librustc_typeck_check
branch
from
September 26, 2018 08:05
809659b to
db69d47Compare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
ljedrzforce-pushed
the
cleanup_librustc_typeck_check
branch
from
September 26, 2018 09:00
db69d47 to
3ed773aCompare
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
kennytm added a commit
to kennytm/rust
that referenced
this pull request
Sep 27, 2018
…davis A few cleanups and minor improvements to typeck This PR complements rust-lang#54533, which was limited to `check`. - change a few `push` loops to `extend`s - prefer `to_owned` to `to_string` for string literals - prefer `if let` to `match` where only one branch matters - a few other minor improvements - whitespace fixes
ljedrzforce-pushed
the
cleanup_librustc_typeck_check
branch
from
September 27, 2018 08:18
3ed773a to
3527276Compareljedrz
commented
Sep 27, 2018
ContributorAuthor
Rebased. |
davidtwco
commented
Sep 27, 2018
Member
@bors r+ |
bors
commented
Sep 27, 2018
Collaborator
📌 Commit 3527276 has been approved by |
bors
commented
Sep 27, 2018
Collaborator
bors added a commit
that referenced
this pull request
Sep 27, 2018
A few cleanups and minor improvements to typeck/check - turn a `loop` into a `while let` - turn a `push_back` loop into an `extend` - turn a few `push` loops into collected iterators - prefer `vec![x; n]` to `(0..n).map(|_| x).collect()` - combine two loops doing the same thing on 2 data sets using `chain` - use `unwrap_or` where applicable and readable - add a `potentially_plural_count` helper function to simplify several `format!()` calls - prefer `to_owned` to `to_string` for string literals - change `match` to `if let` where only one branch matters - a few other minor improvements - whitespace fixes
bors
commented
Sep 27, 2018
Collaborator
☀️ Test successful - status-appveyor, status-travis |
bors added a commit
that referenced
this pull request
Sep 29, 2018
A few cleanups and minor improvements to typeck This PR complements #54533, which was limited to `check`. - change a few `push` loops to `extend`s - prefer `to_owned` to `to_string` for string literals - prefer `if let` to `match` where only one branch matters - a few other minor improvements - whitespace fixes
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for freeto join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
loopinto awhile letpush_backloop into anextendpushloops into collected iteratorsvec![x; n]to(0..n).map(|_| x).collect()chainunwrap_orwhere applicable and readablepotentially_plural_counthelper function to simplify severalformat!()callsto_ownedtoto_stringfor string literalsmatchtoif letwhere only one branch matters