aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-02-08 14:13:39 +0100
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2017-02-08 14:13:39 +0100
commit0a26ac76448ce210b2c5d3820c014ec1c82642e8 (patch)
tree2d2cefbae5e525f03025346f6b593fb15a449c52
parent6a335092f8d74ff449b4a1e422c487512dc45e40 (diff)
downloadaskama-0a26ac76448ce210b2c5d3820c014ec1c82642e8.tar.gz
askama-0a26ac76448ce210b2c5d3820c014ec1c82642e8.tar.bz2
askama-0a26ac76448ce210b2c5d3820c014ec1c82642e8.zip
Simplify write_lit() method
-rw-r--r--askama/src/generator.rs4
1 files changed, 1 insertions, 3 deletions
diff --git a/askama/src/generator.rs b/askama/src/generator.rs
index d3e3746..5fe127e 100644
--- a/askama/src/generator.rs
+++ b/askama/src/generator.rs
@@ -118,9 +118,7 @@ impl Generator {
}
fn write_lit(&mut self, s: &str) {
- self.write("writer.write_str(");
- self.write(&format!("{:#?}", s));
- self.writeln(").unwrap();");
+ self.write(&format!("writer.write_str({:#?}).unwrap();", s));
}
fn write_expr(&mut self, s: &Expr) {