Generic implementation of CloneIntoBoxedContextElement.

This commit is contained in:
Tom Alexander
2020-05-10 21:07:31 -04:00
parent ba79369b5a
commit 256051220d
5 changed files with 11 additions and 31 deletions

View File

@@ -1,8 +1,8 @@
use crate::parser::KVPair;
use crate::parser::{Filter, RValue};
use crate::renderer::context_element::CloneIntoBoxedContextElement;
use crate::renderer::context_element::CompareContextElement;
use crate::renderer::context_element::ContextElement;
use crate::renderer::context_element::IntoBoxedContextElement;
use crate::renderer::walking::walk_path;
use crate::renderer::Loopable;
use crate::renderer::RenderError;
@@ -143,12 +143,6 @@ impl Walkable for String {
}
}
impl IntoBoxedContextElement for String {
fn clone_to_box(&self) -> Box<dyn ContextElement> {
Box::new(self.clone())
}
}
impl CompareContextElement for String {
fn to_any(&self) -> &dyn Any {
self