First I'll try to eliminate the duplication between the BreadcrumbTree and BreadcrumbTreeNode.

This commit is contained in:
Tom Alexander 2020-05-31 18:05:49 -04:00
parent 1111b48270
commit 439601bbb5
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -86,18 +86,15 @@ impl<'a> DustRenderer<'a> {
};
let mut new_nodes = Vec::new();
explicit_context.as_ref().map(|path| {
let x = walk_path(maybe_breadcrumbs, &path.keys);
x.map(|ice| ice.into_context_element(self, breadcrumbs))
.map(|val| if val.is_truthy() {});
// walk_path(breadcrumbs, &path.keys)
// .map(|ice| ice.into_context_element(self, breadcrumbs))
// .map(|val| {
// if val.is_truthy() {
// new_stack.push(val.from_context_element())
// }
// });
});
// explicit_context.as_ref().map(|path| {
// let x = walk_path(maybe_breadcrumbs, &path.keys);
// x.map(|ice| ice.into_context_element(self, breadcrumbs))
// .map(|val| {
// if val.is_truthy() {
// new_nodes.push(val.from_context_element())
// }
// });
// });
injected_context.map(|ctx| new_nodes.push(BreadcrumbTreeNodeElement::Borrowed(ctx)));
new_context_element.map(|ctx| {
new_nodes.push(BreadcrumbTreeNodeElement::Borrowed(