You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Context: I want to render a one off template, while using my custom filters, and macros.
TEMPLATES.render_str() is perfect for that, but it requires a &mut self, which is a problem because I have my Tera as a global static, and I don't want to wrap it in Arc:<Mutex<...>>.
It is mutable because of a call toself.build_inheritance_chains().
May I suggest :
A non-mutable version where it disallows inheritance (using an assert! or return an error).
Replace the existing method, but do the check without rebuilding (requires major refactoring/rewriting some logic to avoid code duplication).
p.s. I am willing to open a PR, but I am not familiar enough with codebase ( yet :) ).