macro_rules! map_err {
($result:expr, $variant:ident$(,)? $($arg:ident$(: $value:expr)?),*) => { ... };
}Expand description
map_err should be used only when the error variant doesn’t capture any owned variables (which is very rare), or exactly at the end of the block (in the position of returned expression).