Keats / tera

A template engine for Rust based on Jinja2/Django
http://keats.github.io/tera/
MIT License
3.44k stars 280 forks source link

replace try_get_value macro with try_get_value generic #804

Closed godofdream closed 1 year ago

godofdream commented 1 year ago

Since generics are possible since ~1.51 we can replace the try_get_value macro with a generic. To not change the speed of the implementation try_get_value is inlined.

I left the macro inplace as deprecated, so we don't introduce a breaking change.

Keats commented 1 year ago

I think, let's keep it as is for now and we can change how we get variables for v2 (maybe axum like dependency injection?).