diff options
author | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2023-09-11 11:37:46 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2023-09-11 12:19:16 +0200 |
commit | dd9635ace66089bda485d4da30cfc6fe131d25f7 (patch) | |
tree | 6afef91cd0eb35819022cf8d7b37bb4c03497924 | |
parent | 43e92aa3b6b9cd967a70bd0fd54d1f087d6ed76b (diff) | |
download | askama-dd9635ace66089bda485d4da30cfc6fe131d25f7.tar.gz askama-dd9635ace66089bda485d4da30cfc6fe131d25f7.tar.bz2 askama-dd9635ace66089bda485d4da30cfc6fe131d25f7.zip |
Rename some variables
Diffstat (limited to '')
-rw-r--r-- | askama_parser/src/expr.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/askama_parser/src/expr.rs b/askama_parser/src/expr.rs index ca1dc9b..3e63d93 100644 --- a/askama_parser/src/expr.rs +++ b/askama_parser/src/expr.rs @@ -248,15 +248,15 @@ impl<'a> Suffix<'a> { } fn r#macro(i: &'a str) -> IResult<&'a str, Self> { - fn nested_parenthesis(i: &str) -> IResult<&str, ()> { + fn nested_parenthesis(input: &str) -> IResult<&str, ()> { let mut nested = 0; let mut last = 0; let mut in_str = false; let mut escaped = false; - for (i, b) in i.chars().enumerate() { - if !(b == '(' || b == ')') || !in_str { - match b { + for (i, c) in input.chars().enumerate() { + if !(c == '(' || c == ')') || !in_str { + match c { '(' => nested += 1, ')' => { if nested == 0 { @@ -281,16 +281,16 @@ impl<'a> Suffix<'a> { } } - if escaped && b != '\\' { + if escaped && c != '\\' { escaped = false; } } if nested == 0 { - Ok((&i[last..], ())) + Ok((&input[last..], ())) } else { Err(nom::Err::Error(error_position!( - i, + input, ErrorKind::SeparatedNonEmptyList ))) } |