Skip to content

Commit b6d0150

Browse files
authored
Rollup merge of rust-lang#138799 - joboet:extend-tuple, r=Mark-Simulacrum
core: simplify `Extend` for tuples This is an alternative to rust-lang#137400. The current macro is incredibly complicated and introduces subtle bugs like calling the `extend_one` of the individual collections in backwards order. This PR drastically simplifies the macro by removing recursion and moving the specialization out of the macro. It also fixes the ordering issue described above (I've stolen the test of the new behaviour from rust-lang#137400). Additionally, the 1-tuple is now special-cased to allow taking advantage of the well-optimized `Extend` implementations of the individual collection.
2 parents 22d7b2f + 5d29ad7 commit b6d0150

File tree

2 files changed

+258
-196
lines changed

2 files changed

+258
-196
lines changed

0 commit comments

Comments
 (0)