diff options
author | max <gmx.sht@gmail.com> | 2023-12-08 14:40:24 +0200 |
---|---|---|
committer | Dirkjan Ochtman <dirkjan@ochtman.nl> | 2024-01-17 17:58:53 +0100 |
commit | 2c7759c0d0534dd9903ebd97b13c4c44320a9aad (patch) | |
tree | f3ba5d09e81bb3fdecd3f564adeeefa23100ed8d /askama_parser/src/lib.rs | |
parent | 411efb89278305a0c38f1f28924a02e03b161679 (diff) | |
download | askama-2c7759c0d0534dd9903ebd97b13c4c44320a9aad.tar.gz askama-2c7759c0d0534dd9903ebd97b13c4c44320a9aad.tar.bz2 askama-2c7759c0d0534dd9903ebd97b13c4c44320a9aad.zip |
Improve performance of `find_used_templates`
Signed-off-by: max <gmx.sht@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | askama_parser/src/lib.rs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/askama_parser/src/lib.rs b/askama_parser/src/lib.rs index 4d27d70..e6f133c 100644 --- a/askama_parser/src/lib.rs +++ b/askama_parser/src/lib.rs @@ -28,6 +28,7 @@ mod _parsed { use super::node::Node; use super::{Ast, ParseError, Syntax}; + #[derive(Default)] pub struct Parsed { // `source` must outlive `ast`, so `ast` must be declared before `source` ast: Ast<'static>, @@ -68,7 +69,7 @@ mod _parsed { pub use _parsed::Parsed; -#[derive(Debug)] +#[derive(Debug, Default)] pub struct Ast<'a> { nodes: Vec<Node<'a>>, } |