3 ms·
Rust embraces this philosophy with the ? operator (when you just want to early return an error) or the let else construct (for more involved short-circuiting).
by nextaccountic 3y ago
Rust embraces this philosophy with the ? operator (when you just want to early return an error) or the let else construct (for more involved short-circuiting). If you type the data you're dealing with properly, this is probably enough for the majority of cases and the resulting code is super clean.