I think I need to make into_context_element return an Option.

The reason is, missing values for paths are not equal to null so I can't use an OwnedLiteral unless I create a special "walking failed" OwnedLiteral.
This commit is contained in:
Tom Alexander 2020-05-31 22:06:12 -04:00
parent 09e0b046a0
commit 3aaf7f9987
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -37,7 +37,11 @@ impl<'a> IntoContextElement for RValue<'a> {
renderer: &DustRenderer, renderer: &DustRenderer,
breadcrumbs: Option<&BreadcrumbTree>, breadcrumbs: Option<&BreadcrumbTree>,
) -> &dyn ContextElement { ) -> &dyn ContextElement {
todo!() match self {
RValue::RVLiteral(owned_literal) => owned_literal,
RValue::RVPath(path) => todo!(),
RValue::RVTemplate(template) => todo!(),
}
} }
} }