#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

#1248 in Procedural macros

Download history 183/week @ 2024-03-09 101/week @ 2024-03-16 1168/week @ 2024-03-23 2214/week @ 2024-03-30 2608/week @ 2024-04-06 1208/week @ 2024-04-13 516/week @ 2024-04-20 3/week @ 2024-04-27

1,928 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