Revert "Improve Template::render() performance"
This reverts commit 4e8b437387
.
This commit is contained in:
parent
383a6db3e3
commit
4fc278ecfb
|
@ -284,20 +284,6 @@ fn derive_template_impl(tokens: TokenStream) -> Result<TokenStream, syn::Error>
|
|||
*buf = __sf_buf.into_string();
|
||||
Ok(())
|
||||
}
|
||||
|
||||
fn render_once(self) -> Result<String, sailfish::runtime::RenderError> {
|
||||
use sailfish::runtime as __sf_rt;
|
||||
|
||||
static SIZE_HINT: __sf_rt::SizeHint = __sf_rt::SizeHint::new();
|
||||
|
||||
let mut __sf_buf = __sf_rt::Buffer::with_capacity(SIZE_HINT.get());
|
||||
|
||||
let #name { #field_names } = self;
|
||||
include!(#output_file_string);
|
||||
|
||||
SIZE_HINT.update(__sf_buf.len());
|
||||
Ok(__sf_buf.into_string())
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in New Issue