aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src/generator.rs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--askama_derive/src/generator.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 24d34cf..b00094d 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -481,8 +481,8 @@ impl<'a> Generator<'a> {
// Implement `Display` for the given context struct.
fn impl_display(&mut self, ast: &syn::DeriveInput) {
self.write_header(ast, "::std::fmt::Display");
- self.writeln("fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::askama::Result<()> {");
- self.writeln("self.render_into(f)");
+ self.writeln("fn fmt(&self, f: &mut ::std::fmt::Formatter) -> ::std::fmt::Result {");
+ self.writeln("self.render_into(f).map_err(|_| ::std::fmt::Error {})");
self.writeln("}");
self.writeln("}");
}