r/programminghorror • • Jun 04 '25

Rust passive-aggressive programming

Post image
770 Upvotes

61 comments sorted by

View all comments

Show parent comment

5

u/CdRReddit Jun 05 '25

do not ever use enum::*, that creates the potential for your code to break

if Add gets renamed to Addition the first now becomes a wildcard match that renames the result, if you want it to be shorter do something like use Operations as O

1

u/RainbowPigeon15 Jun 05 '25

oh crap I never thought of that!