macro_rules! try_add {
($res: expr, $errlog: ident) => { ... };
}Expand description
Macro to push_result() and return given ErrorLog if given Result is an Err
Same as #[cfg_attr(tarpaulin, ignore)]
let mut err_log = ErrorLog::<i32, std::num::ParseIntError>::new();
match "a1".parse::<i32>() {
Ok(o) => err_log.set_ok(o),
Err(e) => {
err_log.push_err(e);
return err_log;
}
};