djc / askama

Type-safe, compiled Jinja-like templates for Rust
Apache License 2.0
3.35k stars 215 forks source link

Implement `Template` for `&Template` #980

Closed Kijewski closed 6 months ago

Kijewski commented 6 months ago

Template does not have methods that alter self in any way, so a reference to a Template can implement Template, too.

This is a breaking change, because a user could have manually added impl Template for &MyStruct {…}.

djc commented 6 months ago

Good call! We've already made breaking changes, so it's fine to land this.