aboutsummaryrefslogtreecommitdiffstats
path: root/askama_parser
diff options
context:
space:
mode:
Diffstat (limited to 'askama_parser')
-rw-r--r--askama_parser/src/lib.rs11
-rw-r--r--askama_parser/src/node.rs11
2 files changed, 11 insertions, 11 deletions
diff --git a/askama_parser/src/lib.rs b/askama_parser/src/lib.rs
index e7c387b..bebf020 100644
--- a/askama_parser/src/lib.rs
+++ b/askama_parser/src/lib.rs
@@ -48,17 +48,6 @@ impl<'a> State<'a> {
}
}
-impl From<char> for Whitespace {
- fn from(c: char) -> Self {
- match c {
- '+' => Self::Preserve,
- '-' => Self::Suppress,
- '~' => Self::Minimize,
- _ => panic!("unsupported `Whitespace` conversion"),
- }
- }
-}
-
mod _parsed {
use std::mem;
diff --git a/askama_parser/src/node.rs b/askama_parser/src/node.rs
index 8719d38..5d44162 100644
--- a/askama_parser/src/node.rs
+++ b/askama_parser/src/node.rs
@@ -55,6 +55,17 @@ pub enum Whitespace {
Minimize,
}
+impl From<char> for Whitespace {
+ fn from(c: char) -> Self {
+ match c {
+ '+' => Self::Preserve,
+ '-' => Self::Suppress,
+ '~' => Self::Minimize,
+ _ => panic!("unsupported `Whitespace` conversion"),
+ }
+ }
+}
+
#[derive(Debug, PartialEq)]
pub struct Loop<'a> {
pub ws1: Ws,