aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive/src
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-08-14 12:57:01 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-08-14 12:57:01 +0200
commit5f3e93da3f1815f24b82b026b95e748267d1b5e8 (patch)
treed9b4049d988874535c868a65ef2450a43e759c5b /askama_derive/src
parent69c447f0c7b515648d0a0cb69466c1e71d81a71e (diff)
downloadaskama-5f3e93da3f1815f24b82b026b95e748267d1b5e8.tar.gz
askama-5f3e93da3f1815f24b82b026b95e748267d1b5e8.tar.bz2
askama-5f3e93da3f1815f24b82b026b95e748267d1b5e8.zip
Use error-chain to create a crate-specific Error type
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("}");
}