about summary refs log tree commit diff
path: root/src/liballoc
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2018-09-27 16:54:28 +0000
committerbors <bors@rust-lang.org>2018-09-27 16:54:28 +0000
commitf1694eac74216da22b395a5589b8d080ccd5a2ec (patch)
treeea703853b6e83c9fa2e46cc788590b83230302ce /src/liballoc
parentc9865b1c37f8cb8a257591e6ea0b32a5df1f3d41 (diff)
parent3527276dba98a307976f58e269a5b193d6b8194b (diff)
downloadrust-f1694eac74216da22b395a5589b8d080ccd5a2ec.tar.gz
rust-f1694eac74216da22b395a5589b8d080ccd5a2ec.zip
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
Diffstat (limited to 'src/liballoc')
0 files changed, 0 insertions, 0 deletions