Remove try_br macro
webmaster128 opened this issue · comments
Simon Warta commented
This is dangerous as it reports the gas value of the last call as the overall gas, which is not how it should behave in the caller.
/// The equivalent of the `?` operator, but for a [`BackendResult`]
macro_rules! try_br {
($res: expr $(,)?) => {
let (result, gas) = $res;
match result {
Ok(v) => v,
Err(e) => return (Err(e), gas),
}
};
}
pub(crate) use try_br;