1 2 3 4 5 6 7 8 9 10 11
use attempted::attempt; #[attempt] fn test(input: Option<i32>) -> i32 { input? } fn main() { assert_eq!(test(Some(42069)), 42069); assert_eq!(test(None), 0); }