|
|
|
|
|
by projct
1987 days ago
|
|
If you get rid of unwrap and use `if let` and `match`, this code will clean up nicely. If the code is supposed to be maintainable, you could also make something like a FromRegex trait for Input. It would be a good idea to try exercism's mentoring thing to get better at writing it the easier way the first time. The mentoring thing really is what helped me to think in ways that made this mess easier to avoid. |
|
The really horrendous scenario was when I was trying to navigate pest iterators for parsing according to a grammar.