As usual, Rust optimizes a bit less if more function boundaries are introduced. However, in my opinion, being able to comprehend the decision tree beats a couple of string allocations.