aboutsummaryrefslogtreecommitdiffstats
path: root/src/document_tree
diff options
context:
space:
mode:
Diffstat (limited to 'src/document_tree')
-rw-r--r--src/document_tree/element_categories.rs10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/document_tree/element_categories.rs b/src/document_tree/element_categories.rs
index b4d63a2..ec53f09 100644
--- a/src/document_tree/element_categories.rs
+++ b/src/document_tree/element_categories.rs
@@ -27,7 +27,7 @@ macro_rules! impl_into {
($subcat:ident :: $entry:ident => $supcat:ident ) => {
impl Into<$supcat> for $entry {
fn into(self) -> $supcat {
- $supcat::$subcat(self.into())
+ $supcat::$subcat(Box::new(self.into()))
}
}
};
@@ -44,9 +44,9 @@ macro_rules! synonymous_enum {
};
( $name:ident { $( $entry:ident ),+ $(,)* } ) => {
#[derive(Serialize)]
- pub enum $name {
- $( $entry($entry), )*
- }
+ pub enum $name { $(
+ $entry(Box<$entry>),
+ )* }
impl Debug for $name {
fn fmt(&self, fmt: &mut Formatter) -> Result<(), fmt::Error> {
@@ -58,7 +58,7 @@ macro_rules! synonymous_enum {
$( impl Into<$name> for $entry {
fn into(self) -> $name {
- $name::$entry(self)
+ $name::$entry(Box::new(self))
}
} )*
};