Attribute Macro function

Source
#[function]
Expand description

Process an expression or item marked with an attribute to modify any uses of the try operator ? into trailing .unwrap(). So Some(42)? will be translated to Some(42).unwrap().

This is useful for adhoc testing.

ยงExamples

#[hodoku::function]
fn hello() {
    let value = Some(42)?;
    assert_eq!(value, 42);
}

hello();