expr!() { /* proc-macro */ }
Expand description
Process an expression to modify any uses of the try operator ?
into
trailing .unwrap()
. So expr!(Some(42)?)
will be translated to
Some(42).unwrap()
.
This is useful for adhoc testing.
Examples
let value = hodoku::expr!(Some(42)?);
assert_eq!(value, 42);