aboutsummaryrefslogtreecommitdiffstats
path: root/askama_shared/src/generator.rs
diff options
context:
space:
mode:
authorLibravatar René Kijewski <kijewski@library.vetmed.fu-berlin.de>2021-07-01 12:57:49 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2021-07-05 13:48:41 +0200
commit8adee24836738e626f06d6f677a9e8621108ca66 (patch)
treefe5ca36cf5b4ff517ff708764108d810ad4cc4af /askama_shared/src/generator.rs
parent20a5f7af7b1195bc8ffa0612a40a8d95bc30914b (diff)
downloadaskama-8adee24836738e626f06d6f677a9e8621108ca66.tar.gz
askama-8adee24836738e626f06d6f677a9e8621108ca66.tar.bz2
askama-8adee24836738e626f06d6f677a9e8621108ca66.zip
Parse nested tuples in "let" statement lhs
Diffstat (limited to 'askama_shared/src/generator.rs')
-rw-r--r--askama_shared/src/generator.rs6
1 files changed, 3 insertions, 3 deletions
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(")");