With new versions of Rust, you can simplify structure initialization like this:
Foo {
a: a,
b: b,
}
to this
Foo { a, b }
Is it possible to do something similar for format!
/println!
-like macros?
For now I need to write it like this:
let a = "a";
let b = "b";
write!(file, "{a} is {b}", a = a, b = b).unwrap();
Is it possible to write my own macros with an API like this:
let a = "a";
let b = "b";
my_write!(file, "{a} is {b}", a, b).unwrap();