From ae02be87c69c17df1ba2b4c862c561e2e75a5bef Mon Sep 17 00:00:00 2001 From: Dirkjan Ochtman Date: Wed, 28 Jun 2023 09:28:56 +0200 Subject: Parse templates once --- askama_derive/src/parser/mod.rs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'askama_derive/src/parser') diff --git a/askama_derive/src/parser/mod.rs b/askama_derive/src/parser/mod.rs index 79b178e..ccc9ff9 100644 --- a/askama_derive/src/parser/mod.rs +++ b/askama_derive/src/parser/mod.rs @@ -58,10 +58,7 @@ impl From for Whitespace { } } -pub(crate) fn parse<'a>( - src: &'a str, - syntax: &'a Syntax<'_>, -) -> Result>, CompileError> { +pub(crate) fn parse<'a>(src: &'a str, syntax: &Syntax<'_>) -> Result>, CompileError> { match Node::parse(src, &State::new(syntax)) { Ok((left, res)) => { if !left.is_empty() { -- cgit