How can I write a macro like this:
#[macro_export]
macro_rules! unwrap_continue {
($e:expr, $($arg:tt)*,) => {
match $e {
Ok(r) => r,
Err(e) => {
println!("{:?} {}", e, $($args:tt)*);
continue;
}
}
}
}
so that this line:
unwrap_continue!(e, info1, info2);
do the same thing as this block:
match e {
Ok(r) => r,
Err(e) => {
println!("{:?} {:?} {:?}", e, info1, info2);
continue;
}
}