rafamadriz / friendly-snippets

Set of preconfigured snippets for different languages.
MIT License
2.04k stars 461 forks source link

feat(rust): escape parameter in format like macros #494

Closed ValdezFOmar closed 1 month ago

ValdezFOmar commented 1 month ago

Follow up https://github.com/rafamadriz/friendly-snippets/pull/486

This was the change suggested by @dev-ardi

dev-ardi commented 1 month ago

I think that this only makes sense for dbg!, format! and format_args!, where you always want to pass in an argument, for the rest you might be fine without it: println!("hello world"). The rest I don't even think that they should exist as snippets as they don't really add any value over the r-a suggestion. format_args! is never used outside of macros so I'd vote to kill it as well.

Thoughts?

dev-ardi commented 1 month ago

https://github.com/rafamadriz/friendly-snippets/issues/495

ValdezFOmar commented 1 month ago

I think that this only makes sense for dbg!, format! and format_args!, where you always want to pass in an argument, for the rest you might be fine without it: println!("hello world").

Thoughts?

Hmmm, I'm thinking that it might not even be worth it to include this format macros since you probably would like to include more than just the argument (like format specifiers).