#macro_rules — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #macro_rules, aggregated by home.social.
-
is it possible to write a Rust macro that transforms:
macro!(value => {
a => b,
c,
d => e,
f,
})
// with repetition of either declaration formatinto
match value {
a => fn(b),
c => fn(c),
d => fn(e),
f => fn(f),
}
// etc