diff --git a/src/renderer/parameters_context.rs b/src/renderer/parameters_context.rs index e614adc..ade5aa2 100644 --- a/src/renderer/parameters_context.rs +++ b/src/renderer/parameters_context.rs @@ -43,21 +43,19 @@ impl<'a> ParametersContext<'a> { .iter() .map(|kvpair| { let k = kvpair.key; - let v: BreadcrumbTreeElement<'a> = match &kvpair.value { + let v: Option> = match &kvpair.value { RValue::RVLiteral(owned_literal) => { - BreadcrumbTreeElement::Borrowed(&kvpair.value) + Some(BreadcrumbTreeElement::Borrowed(&kvpair.value)) } - /*RValue::RVPath(path) => kvpair - .value - .into_context_element(renderer, breadcrumbs) - .unwrap() - .get_context_element_reference() - .from_context_element(),*/ - RValue::RVPath(path) => todo!(), + RValue::RVPath(path) => kvpair + .value + .into_context_element(renderer, breadcrumbs) + .map(std::convert::From::from), RValue::RVTemplate(template) => todo!(), }; - (k, v) + v.map(|some_v| (k, some_v)) }) + .filter_map(|pair| pair) .collect(); ParametersContext {