let config: Result<i32, i32> = { Ok( "1234".parse::<i32>().map_err(|_| -1)? ) };
let config: Result<i32, i32> = (||{ Ok( "1234".parse::<i32>().map_err(|_| -1)? ) })();
Hopefully try blocks will allow using ? inside of expression blocks in the future, though.
And the workarounds often make the pattern be a net loss in clarity.
Hopefully try blocks will allow using ? inside of expression blocks in the future, though.