zinke owl cabre is a user on mastodon.social. You can follow them or interact with them if you have an account anywhere in the fediverse. If you don't, you can sign up here.

Rust needs .unwrap_as_in_i_havent_worried_about_error_handling_yet() and .unwrap_as_in_it_is_statically_impossible_for_this_to_go_wrong_and_if_it_does_you_should_really_panic()

.expect() pulls some of that weight, but like... it doesn't make sense to be like:

if x.is_none() {
return;
}
let x = x.expect("Shouldn't happen")

zinke owl cabre @zwol

@jennamagius hmm, I think “if let Some(x) = x { ... }” is the recommended way to do that right now, and I vaguely remember discussion on internals.rust-lang.org of making an early return form possible as well