diff options
Diffstat (limited to 'askama_parser')
-rw-r--r-- | askama_parser/src/lib.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/askama_parser/src/lib.rs b/askama_parser/src/lib.rs index a19181d..6ff9360 100644 --- a/askama_parser/src/lib.rs +++ b/askama_parser/src/lib.rs @@ -23,6 +23,7 @@ mod node; mod tests; mod _parsed { + use std::cmp::PartialEq; use std::{fmt, mem}; use super::{Ast, Node, ParseError, Syntax}; @@ -57,6 +58,12 @@ mod _parsed { .finish_non_exhaustive() } } + + impl PartialEq for Parsed { + fn eq(&self, other: &Self) -> bool { + self.ast.nodes == other.ast.nodes + } + } } pub use _parsed::Parsed; |