News for hackers. Stuff that matters.
Re:Effective Rust by harpiaharpyja on Thursday June 15, 2023 @11:04AM (#36341531)
Occasionally matching Option or Result is actually the most readable way to express some logic. But it's definitely not the first thing you should reach for.

When I first started using Rust I did make the mistake of matching Option and Result everywhere and when I learned better I did cut out quite a bit of verbosity and unnecessary nesting by going back and refactoring those in code I had written. But that doesn't mean you should never use match with them. I thought I should share this experience for anyone new to the language reading this.

There are no comments on this comment yet.