massivebird / arcconfig

A library for interacting with my video game archive
https://crates.io/crates/arcconfig
GNU General Public License v3.0
0 stars 0 forks source link

refactor: `error_msg` into a macro #18

Open massivebird opened 6 months ago

massivebird commented 6 months ago

Check out this StackOverflow discussion that talks about creating a custom format! style macro! I just did this for Subterfuge :3

Changing the symbol name is a good idea, too. Get a verb in there! Even something long like print_error! would be an improvement.

massivebird commented 6 months ago

Before implementing this, I want to figure out an idiomatic way to print the macro arguments after prefixing them with some string. The subterfuge implementation uses a clunky print! followed by a println!. I want to do better for arcconfig.