test(examples): render hemplate views into buffers
Use hemplate render_into in public examples and example tests instead of the string-returning render helper, preserving SafeHtml wrapping only at the explicit effect boundary. req: view/001 req: html_safety/002
This commit is contained in:
@@ -222,7 +222,11 @@ fn render_html(template: &impl Hemplate) -> SafeHtml {
|
||||
}
|
||||
|
||||
fn render_template(template: &impl Hemplate) -> String {
|
||||
template.render().expect("v0 hemplate view renders")
|
||||
let mut html = String::new();
|
||||
template
|
||||
.render_into(&mut html)
|
||||
.expect("v0 hemplate view renders");
|
||||
html
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in New Issue
Block a user