aboutsummaryrefslogtreecommitdiffstats
path: root/askama_derive
diff options
context:
space:
mode:
authorLibravatar max <gmx.sht@gmail.com>2023-12-13 15:33:34 +0200
committerLibravatar Dirkjan Ochtman <dirkjan@ochtman.nl>2023-12-13 16:47:02 +0100
commit28182a1549a6546750d3f9834cb35686b89c3cf9 (patch)
tree76c1eca645646b1d18a32175a20d166b82a4a5b7 /askama_derive
parente4b8ca3c44b5ede192700d0e4c9ed1c58338c1b6 (diff)
downloadaskama-28182a1549a6546750d3f9834cb35686b89c3cf9.tar.gz
askama-28182a1549a6546750d3f9834cb35686b89c3cf9.tar.bz2
askama-28182a1549a6546750d3f9834cb35686b89c3cf9.zip
Bugfix in `is_attr_self()`
Signed-off-by: max <gmx.sht@gmail.com>
Diffstat (limited to 'askama_derive')
-rw-r--r--askama_derive/src/generator.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/askama_derive/src/generator.rs b/askama_derive/src/generator.rs
index 65136c6..6004aff 100644
--- a/askama_derive/src/generator.rs
+++ b/askama_derive/src/generator.rs
@@ -1945,7 +1945,7 @@ fn is_copyable_within_op(expr: &Expr<'_>, within_op: bool) -> bool {
pub(crate) fn is_attr_self(expr: &Expr<'_>) -> bool {
match expr {
Expr::Attr(obj, _) if matches!(obj.as_ref(), Expr::Var("self")) => true,
- Expr::Attr(obj, _) if matches!(obj.as_ref(), Expr::Attr(..)) => is_attr_self(expr),
+ Expr::Attr(obj, _) if matches!(obj.as_ref(), Expr::Attr(..)) => is_attr_self(obj),
_ => false,
}
}