Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

This has been a thing since Rust 1.0. Just use the beautiful properties of match (or the "later" `if let`, of course). I prefer this and wish I could say it was idiomatic, but some tools like clippy push users over to helper methods instead of simple applications of match.


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: