-
Notifications
You must be signed in to change notification settings - Fork 12.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #54533 - ljedrz:cleanup_librustc_typeck_check, r=davidtwco
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
- Loading branch information
Showing
19 changed files
with
450 additions
and
581 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.