Switched to returning an Option for into_context_element().

This commit is contained in:
Tom Alexander
2020-05-31 22:17:58 -04:00
parent 3aaf7f9987
commit b74dc394a8
3 changed files with 15 additions and 11 deletions

View File

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