rinja-rs / rinja

A template rendering engine based on Jinja, generating type-safe Rust code at compile time.
https://rinja.readthedocs.io
Apache License 2.0
28 stars 4 forks source link

Add support for `..` in let pattern matching for structs #35

Closed GuillaumeGomez closed 1 week ago

GuillaumeGomez commented 1 week ago

This PR adds support for:

{% if let X { a, .. } = x %}

So only for structs for now. Planning to add them for tuples and eventually arrays too.

I'm not super happy with the parser code changes. I find the code very ugly but couldn't find a better way to do it. If you have ideas on how to improve it, I'd love to hear them!