Using unwrap() in Rust is Okay
One day before Rust 1.0 was released, I published a
blog post covering the fundamentals of error handling.
A particularly important but small section buried in the middle of the article
is named “unwrapping isn’t evil”. That section briefly
described that, broadly speaking, using unwrap() is okay if it’s in
test/example code or when panicking indicates a bug.
I generally still hold that belief today. That belief is put into practice in
Rust’s standard library and in many core ecosystem crates. (...
Read more at blog.burntsushi.net