Open breathx opened 3 months ago
@breathx can you please elaborate on this? Any examples of usage?
@breathx better description is on you
fn mint(&nut self, value: u64) -> bool { ler r: Result<bool, String> = some_func(); r.unwrap(); // intentionally }
fn mint(&nut self, value: u64) -> Result<bool, String> { ler r: Result<bool, String> = some_func()?; }
Wouldn't it be better to use the existing route
attribute with the unwrap_result
prameter?
#[route(unwrap_result)]
fn mint(&nut self, value: u64) -> Result<bool, String> {
ler r: Result<bool, String> = some_func()?;
}
The macro will require Result in return type, but it only will be for ability to use
?
. On expand it will unwrap() the result and return only Ok(T)