There seem to be a lot of "gotchas" when creating a new macro that accepts format arguments. I propose to add a recipe for such cases. Something like this, although my code might also need some improvements. Points of interest:
best way to capture format arguments - comma capturing is actually fairly tricky because foo!("{}", bar) can be auto-replaced with foo("{bar}"), which has no commas.
There seem to be a lot of "gotchas" when creating a new macro that accepts format arguments. I propose to add a recipe for such cases. Something like this, although my code might also need some improvements. Points of interest:
foo!("{}", bar)
can be auto-replaced withfoo("{bar}")
, which has no commas.