News for hackers. Stuff that matters.
Re:Rust Weird Expressions by OJFord on Friday May 14, 2021 @01:03PM (#27156632)
Hang on aren't we conflating two things in this thread? Or you quoted the wrong half of GP's comment perhaps? You can pattern match on an actual `bool`; if you use `Result<(), ()>` instead you'll have to match on `Ok(_)`/`Err(_)`, which is bad because one of your Boolean values is an 'error' now, and also because which one is is up to you (to remember)!

There are no comments on this comment yet.