aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-08-21 20:57:38 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-08-21 20:59:25 +0200
commitec5a2ebbb375d5ad49daeba72ec6aeb874d4a81e (patch)
treecd941e6011138a7a212c8cbe6b65bde91413d60b /askama_derive
parent4f4b5a3a65eed09fbb9578ce9df72076e0b05f66 (diff)
downloadaskama-ec5a2ebbb375d5ad49daeba72ec6aeb874d4a81e.tar.gz
askama-ec5a2ebbb375d5ad49daeba72ec6aeb874d4a81e.tar.bz2
askama-ec5a2ebbb375d5ad49daeba72ec6aeb874d4a81e.zip
Change filters to return Result
Diffstat (limited to 'askama_derive')
-rw-r--r--askama_derive/src/generator.rs3
1 files changed, 3 insertions, 0 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 60d028b..3288e22 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -227,6 +227,9 @@ impl<'a> Generator<'a> {
self.visit_expr(arg);
}
self.write(")");
+ if name != "format" {
+ self.write("?");
+ }
}
fn visit_binop(&mut self, op: &str, left: &Expr, right: &Expr) {