4 ms·
It's probably not the most idiomatic thing, but in Rust you can write: let foo = match () { _ if x <= 0 => 0, _ if something_else > 50 => 9
by GrayShade 6y ago
It's probably not the most idiomatic thing, but in Rust you can write:
let foo = match () {
_ if x <= 0 => 0,
_ if something_else > 50 => 9000,
_ => 42,
};