Instead of using functions, implement methods on strcuts and enums. This looks more ergonomic and gives a better way to import the objects as well as a clear signal of what the output of the function actually is.
This is again a mostly cosmetic refactoring to improve the ergonomics of the code, but not substantial changes, so I will once again self-approve this one.
Instead of using functions, implement methods on strcuts and enums. This looks more ergonomic and gives a better way to import the objects as well as a clear signal of what the output of the function actually is.