diff options
Diffstat (limited to '')
-rw-r--r-- | askama_shared/src/generator.rs | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/askama_shared/src/generator.rs b/askama_shared/src/generator.rs index e6a890e..b5ab31c 100644 --- a/askama_shared/src/generator.rs +++ b/askama_shared/src/generator.rs @@ -1453,12 +1453,10 @@ impl<'a, S: std::hash::BuildHasher> Generator<'a, S> { args: &[Expr], ) -> Result<DisplayWrap, CompileError> { buf.write("("); - if self.locals.contains(&s) || s == "self" { - buf.write(s); - } else { + if !self.locals.contains(&s) && s != "self" { buf.write("self."); - buf.write(s); } + buf.write(s); buf.write(")("); self._visit_args(buf, args)?; buf.write(")"); |