next.js
58ab93b1 - chore(turbo-tasks-backend): Clean up internal macros (#71061)

Commit
1 year ago
chore(turbo-tasks-backend): Clean up internal macros (#71061) Figured it was easier to fix these myself than to try to suggest changes on #70798: - Fix some inconsistency inside `iter_many` about how derefing happens depending on how arguments are used. - Simplify `get_many`'s argument passthrough to `iter_many` using a `tt` group: https://veykril.github.io/tlborm/decl-macros/patterns/tt-bundling.html - Manually line-wrap macros, which rustfmt does not do. - Rename some of `iter_many` arguments (the name "`value`" was a little too overloaded here) and add some really basic documentation. - Eliminate a few branches using `?` repetitions instead: https://veykril.github.io/tlborm/decl-macros/macros-methodical.html#repetitions - The `value_pattern` (previously `value_ident`) of `iter_many` can technically be any pattern (even though nothing currently needs that), so broaden the type from `ident` to `tt`.
Author
bgw bgw
Parents
Loading