this post was submitted on 17 Dec 2025
474 points (96.1% liked)
Programmer Humor
27937 readers
563 users here now
Welcome to Programmer Humor!
This is a place where you can post jokes, memes, humor, etc. related to programming!
For sharing awful code theres also Programming Horror.
Rules
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
Enums are the best part of the Rust language IMO, so I'm not sure how you can view them as ugly. Having the choice to destructure something is fantastic. You generally aren't required to destructure every return value. Make sure you're using the
?operator as much as possible. If destructuring is getting in your way, it sounds like the code is not very idiomatic.I can't really comment on your issue with nested
ifandmatch. Too much nesting is bad in any language; try extracting more functions and let bindings to make it more readable.You can enable a clippy lint to deny
.unwrap()if you're worried about it.