Commits
Click on a commit to change the comparison rangerefactor(ast_codegen): simplify `derive_get_span` generator (#4757)
Simplify `derive_get_span` generator that was introduced in #4735. No change to functionality, just aiming for greater readability.
In particular:
* Move defining idents/tokens which are specific to `GetSpan` / `GetSpanMut` into those specific generators, rather than branching on `MUT` later on.
* Remove `const MUT` param.
* Remove the confusing pairs of closures and functions both called `derive_enum` / `derive_struct`.
* Inline function which generates the impls - prioritizing readability over DRY code.1 year ago
by overlookmotel