diff options
author | René Kijewski <rene.kijewski@fu-berlin.de> | 2023-08-01 11:34:12 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2023-08-01 13:04:41 +0200 |
commit | 11f3d0714ce20a45aa929052ce57e969f9048f72 (patch) | |
tree | baf27e5e22478fbb5bf8eb0f1e0659eb9d52da1f | |
parent | 4315773676527c94646315ac2a3475fd6eb2925a (diff) | |
download | askama-11f3d0714ce20a45aa929052ce57e969f9048f72.tar.gz askama-11f3d0714ce20a45aa929052ce57e969f9048f72.tar.bz2 askama-11f3d0714ce20a45aa929052ce57e969f9048f72.zip |
parser: move test for completeness
Diffstat (limited to '')
-rw-r--r-- | askama_parser/src/node.rs | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/askama_parser/src/node.rs b/askama_parser/src/node.rs index a45cc89..2d82868 100644 --- a/askama_parser/src/node.rs +++ b/askama_parser/src/node.rs @@ -36,12 +36,12 @@ pub enum Node<'a> { impl<'a> Node<'a> { pub(super) fn many(i: &'a str, s: &State<'_>) -> IResult<&'a str, Vec<Self>> { - many0(alt(( - map(complete(|i| Lit::parse(i, s)), Self::Lit), - map(complete(|i| Comment::parse(i, s)), Self::Comment), - complete(|i| Self::expr(i, s)), - complete(|i| Self::parse(i, s)), - )))(i) + complete(many0(alt(( + map(|i| Lit::parse(i, s), Self::Lit), + map(|i| Comment::parse(i, s), Self::Comment), + |i| Self::expr(i, s), + |i| Self::parse(i, s), + ))))(i) } fn parse(i: &'a str, s: &State<'_>) -> IResult<&'a str, Self> { |