Open elichai opened 4 years ago
The current way we match over the result breaks type coercion, example:
example this will break: (https://play.rust-lang.org/?gist=487d56225ce4b06116eb357f75bf6474)
#[logfn(INFO)] fn first() -> Result<u8, Box<dyn Error>> { Err(Box::new(MyError)) }
Possible solutions:
?
Ok(expr?)
Ok
If the possible solution is merged might this issue be now closed?
The current way we match over the result breaks type coercion, example:
example this will break: (https://play.rust-lang.org/?gist=487d56225ce4b06116eb357f75bf6474)
Possible solutions:
?
operator, (ieOk(expr?)
), but this again complicates no-std support becauseOk
is a prelude that might not always be in scope