Skip to content

Conversation

@Kromgart
Copy link
Contributor

Hi there,

I noticed that using the "Nested template" syntax generates .render_once() for those templates, which seems to use intermediate buffer. But TemplateOnce also has a .render_once_to() function. So it seems that when the template is not using any filter we can write the template directly to output buffer.

I update the translator.rs to do that, also updated the test (for NestedTemplateOnce without filter). The nested template with filter works as before.

Also I removed the 'suffix' parameter completely, as it seems like it was there just to insert the .render_once() call.

@vthg2themax vthg2themax self-assigned this Dec 5, 2025
@vthg2themax vthg2themax merged commit 58a3d81 into rust-sailfish:main Dec 5, 2025
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants