From 3a12f77521543cb134f3a271418e6d2e3d7f028e Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 8 Feb 2017 09:24:24 +0100 Subject: Purge useless format!() calls --- askama/src/generator.rs | 4 ++-- 1 file 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); -- cgit