Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(transformer): clarify match in RegExp transform (#5498)
Refactor match on `Term` in RegExp transform. This is personal taste, really. I prefer this style: ```rs match enum { Enum::Variant(x) => x.is_something(), _ => false, } ``` over: ```rs match enum { Enum::Variant(x) if x.is_something() => true, _ => false, } ``` because then you don't have to reason about what happens when the `if` is false and it "falls through" to the next match arm. The compiler *might* also find the former easier to optimize, though likely in most cases it can figure out that they're equivalent. Also rename a couple of vars for clarity.
- Loading branch information