utkarshkukreti / markup.rs

A blazing fast, type-safe template engine for Rust.
Apache License 2.0
350 stars 14 forks source link

Implement Render for fmt::Arguments #22

Closed Kijewski closed 2 years ago

Kijewski commented 2 years ago

This makes it possible to use format_args!() instead of format!(), e.g. to print the debug output of some T without allocating a temporary String.

utkarshkukreti commented 2 years ago

Thanks! I implemented Render for tuples earlier to eliminate allocations in simple cases (e.g. div[id = ("post-", post.id)] {}, but this is much more flexible.