Compiling.

Need to see if I can do a generic implemented of IntoBoxedContextElement for all objects implementing Copy, and I need to implement the compare code to make sure this all works before I start integrating this more.
This commit is contained in:
Tom Alexander
2020-05-10 19:07:41 -04:00
parent 5c79b436a0
commit c96b2257d7
4 changed files with 18 additions and 20 deletions

View File

@@ -1,5 +1,6 @@
extern crate nom;
use crate::renderer::IntoBoxedContextElement;
use parser::Filter;
use renderer::compile_template;
use renderer::CompiledTemplate;
@@ -137,3 +138,9 @@ impl Loopable for serde_json::Value {
}
}
}
impl IntoBoxedContextElement for serde_json::Value {
fn clone_to_box(&self) -> Box<dyn ContextElement> {
Box::new(self.clone())
}
}