aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-02-08 09:24:24 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-02-08 09:24:24 +0100
commit3a12f77521543cb134f3a271418e6d2e3d7f028e (patch)
treec03bda31a3a53dcc94af4c1c583e1ea46630298c
parent657b1566b54ff0e04246b920e4df99b07fef3d95 (diff)
downloadaskama-3a12f77521543cb134f3a271418e6d2e3d7f028e.tar.gz
askama-3a12f77521543cb134f3a271418e6d2e3d7f028e.tar.bz2
askama-3a12f77521543cb134f3a271418e6d2e3d7f028e.zip
Purge useless format!() calls
-rw-r--r--askama/src/generator.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/askama/src/generator.rs b/askama/src/generator.rs
index 85896c4..c3ba454 100644
--- a/askama/src/generator.rs
+++ b/askama/src/generator.rs
@@ -80,7 +80,7 @@ impl Generator {
fn visit_var(&mut self, s: &[u8]) {
let s = str::from_utf8(s).unwrap();
if self.locals.contains(s) {
- self.write(&format!("{}", s));
+ self.write(&s);
} else {
self.write(&format!("self.{}", s));
}
@@ -157,7 +157,7 @@ impl Generator {
let targets = self.visit_target(var);
for name in &targets {
self.locals.insert(name.clone());
- self.write(&format!("{}", name));
+ self.write(name);
}
self.write(" in &");
self.visit_expr(iter);