#whether #format #macro #format-args #procedural #proc-macro #expand

macro format_args_conditional

A procedural macro that can expand to one macro or another based on whether format_args! input could be optimized as write_str

2 releases

0.1.1 Mar 13, 2024
0.1.0 Mar 13, 2024

#1529 in Procedural macros

Download history 202/week @ 2024-03-11 373/week @ 2024-03-18 1192/week @ 2024-03-25 3167/week @ 2024-04-01 1725/week @ 2024-04-08 1190/week @ 2024-04-15 152/week @ 2024-04-22

6,383 downloads per month
Used in bitty_write_macro

Apache-2.0

15KB
308 lines

This is the procedural macro that powers bitty_write_macro. It can be used in your own projects to generate different code based on whether format arguments use variables or a constant string.

No runtime deps