Skip to content

Commit

Permalink
Better support for Iterator variants in for loop (fixes #8)
Browse files Browse the repository at this point in the history
  • Loading branch information
djc committed Mar 6, 2017
1 parent 5763b88 commit b469bc2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions askama_derive/src/generator.rs
Original file line number Diff line number Diff line change
Expand Up @@ -279,9 +279,9 @@ impl<'a> Generator<'a> {
self.locals.insert(name.clone());
self.write(name);
}
self.write(" in &");
self.write(" in (&");
self.visit_expr(iter);
self.writeln(" {");
self.writeln(").into_iter() {");

self.writeln("_loop_indexes[_loop_cur] += 1;");
self.handle(body);
Expand Down

0 comments on commit b469bc2

Please sign in to comment.