diff options
| author | bors <bors@rust-lang.org> | 2018-12-09 22:39:44 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2018-12-09 22:39:44 +0000 |
| commit | 9cb38a84e7d593106946cae8e25d9cdbf24751ee (patch) | |
| tree | 4be9fd3515502a4f151504332fcbb156b6707206 /src/libstd/sys/redox/stack_overflow.rs | |
| parent | b755501043d5b27b39f94bcadd57c8d5dedfd6ba (diff) | |
| parent | ae532730215f1e74b175d1aa214146e9d900e5fd (diff) | |
| download | rust-9cb38a84e7d593106946cae8e25d9cdbf24751ee.tar.gz rust-9cb38a84e7d593106946cae8e25d9cdbf24751ee.zip | |
Auto merge of #56463 - ljedrz:slice_concat_join, r=nikic
slice: tweak concat & join
- use `sum` instead of `fold` (readability)
- adjust the capacity for `join` - the number of separators is `n - 1`, not `n`; proof:
```
fn main() {
let a = [[1, 2], [4, 5]];
let v = a.join(&3);
assert_ne!(v.len(), v.capacity()); // len is 5, capacity is 6
}
```
Diffstat (limited to 'src/libstd/sys/redox/stack_overflow.rs')
0 files changed, 0 insertions, 0 deletions
