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 #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 } ```
- Loading branch information