Fix the last case by changing the lifetimes and delete the old fractured implementation.

This commit is contained in:
Tom Alexander
2020-05-24 15:01:41 -04:00
parent 4790ac77d6
commit 46fe1f5204
2 changed files with 2 additions and 109 deletions

View File

@@ -14,7 +14,6 @@ use crate::renderer::errors::WalkError;
use crate::renderer::inline_partial_tree::extract_inline_partials;
use crate::renderer::inline_partial_tree::InlinePartialTreeElement;
use crate::renderer::parameters_context::ParametersContext;
use crate::renderer::walking::walk_path;
use crate::renderer::walking::walk_path_combined;
use std::collections::HashMap;
@@ -490,7 +489,7 @@ impl<'a> DustRenderer<'a> {
}
fn get_rval<'b>(
breadcrumbs: &Vec<&'b dyn ContextElement>,
breadcrumbs: &'b Vec<&'b dyn ContextElement>,
param_map: &HashMap<&str, &'b RValue<'b>>,
key: &str,
) -> Option<Result<&'b dyn ContextElement, WalkError>> {
@@ -498,7 +497,7 @@ impl<'a> DustRenderer<'a> {
None => None,
Some(rval) => match rval {
RValue::RVLiteral(literal) => Some(Ok(literal)),
RValue::RVPath(path) => Some(walk_path(breadcrumbs, &path.keys)),
RValue::RVPath(path) => Some(walk_path_combined(breadcrumbs, &path.keys)),
},
}
}