Misterio77 / flavours

🎨💧 An easy to use base16 scheme manager that integrates with any workflow.
MIT License
501 stars 29 forks source link

Hide {} in error message from formatting machinery #40

Closed dtolnay closed 2 years ago

dtolnay commented 2 years ago

I am looking into resolving https://github.com/dtolnay/anyhow/issues/55 and this looks like one of only 2 places on crates.io where "{}" is used intentionally in an error message — meanwhile there were a couple dozen where it's a bug where they forgot to pass a second argument that was supposed to be interpolated in the message.

If you are open to tweaking this code, I'll land a fix for https://github.com/dtolnay/anyhow/issues/55 to help others catch missed format arguments.

Misterio77 commented 2 years ago

LGTM! Thanks for the patch.