News for hackers. Stuff that matters.
Re:My Struggles with Rust by ordu on Sunday May 07, 2017 @02:53PM (#14286911)
I agree, its not a great idea to use unwrap() in production code, it is bad even when its safe to unwrap.

But speaking about blogs... Why not to use .unwrap() there? Its simple, and allows to show some ideas without digging into error handling, just point to places where those handling should be placed.

> but if you're gonna have unwrap, you basically have to have exceptions as well (or some kind of panic recovery) ...

https://doc.rust-lang.org/1.9.0/std/panic/fn.catch_unwind.ht...

There are no comments on this comment yet.