Elvis operator for Rust

A way to achieve the same thing, but in a less baked in way, would be for it to be a postfix macro:

let foo = foo.unwrap_or!(return);
let bar = bar.unwrap_or!(5);
3 Likes