News for hackers. Stuff that matters.
Re:Rust should not have provided `unwrap` by mcronce on Friday July 15, 2022 @02:31PM (#32111340)
If your function is fallible, your function is fallible - it's up to you to decide whether that means returning Result or panicking. If you want your function to be infallible, while itself calling a fallible function, you have to handle the error cases from your callees - you have `.unwrap_or_default()`, `.unwrap_or_else()`, `.unwrap_or()`, and simple `match` all in your toolbox to do this.

There are no comments on this comment yet.