Swift has had ‘guard’ statements since 2015, and it’s the biggest thing I miss when programming in Rust:
guard let x = ... else {
// must not fall through, so a return, break, throw, non-returning function call, etc. is required
}
// do something with x