News for hackers. Stuff that matters.
Re:Speeding Up the Rust Compiler by jashmatthews on Wednesday December 11, 2019 @06:56AM (#21761639)
Unwrap and expect don’t violate any safety rules! If they did you’d need to wrap it in an unsafe block.

https://doc.rust-lang.org/nomicon/unwinding.html

Re:Speeding Up the Rust Compiler by tov_objorkin on Wednesday December 11, 2019 @08:52AM (#21762271)
You're technically right, i mean if user aim for durable code then using unwrap is not desired behavior most of the time. For example pointer deference in C is implicit operation. In Rust user must choose explicitly how to handle Option/Result. Even if using unwrap not so harmful as using unsafe and didn't violate rules this is our deliberate choose to break "end-user safety".