From 8adee24836738e626f06d6f677a9e8621108ca66 Mon Sep 17 00:00:00 2001 From: René Kijewski Date: Thu, 1 Jul 2021 12:57:49 +0200 Subject: Parse nested tuples in "let" statement lhs --- askama_shared/src/generator.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'askama_shared/src/generator.rs') diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs index 281c3b0..a7f52ca 100644 --- a/askama_shared/src/generator.rs +++ b/askama_shared/src/generator.rs @@ -826,7 +826,7 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> { } Target::Tuple(targets) => targets .iter() - .any(|name| self.is_shadowing_variable(&Target::Name(name))), + .any(|target| self.is_shadowing_variable(target)), } } @@ -1523,8 +1523,8 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> { } Target::Tuple(targets) => { buf.write("("); - for name in targets { - self.visit_target(buf, initialized, &Target::Name(name)); + for target in targets { + self.visit_target(buf, initialized, target); buf.write(","); } buf.write(")"); -- cgit