Broke the problem area down into parts to make it easier to debug.

This commit is contained in:
Tom Alexander 2020-06-06 16:03:02 -04:00
parent 842f39e178
commit adbc236836
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE

View File

@ -220,7 +220,14 @@ impl<'a> DustRenderer<'a> {
};
let mut new_nodes: Vec<BreadcrumbTreeElement> = Vec::new();
explicit_context.as_ref().map(|path| {
let p = explicit_context.as_ref().unwrap();
let x = walk_path(maybe_breadcrumbs, &p.keys);
let ice = x.unwrap();
let ce = ice.into_context_element(self, maybe_breadcrumbs);
let val = ce.unwrap();
let to_insert = BreadcrumbTreeElement::Owned(Rc::new(val));
//new_nodes.push(BreadcrumbTreeElement::Owned(Rc::new(val)));
/*explicit_context.as_ref().map(|path| {
walk_path(maybe_breadcrumbs, &path.keys)
.map(|ice| ice.into_context_element(self, maybe_breadcrumbs))
.ok()
@ -230,7 +237,7 @@ impl<'a> DustRenderer<'a> {
new_nodes.push(BreadcrumbTreeElement::Owned(Rc::new(val)))
}
});
});
});*/
injected_context.map(|ctx| new_nodes.push(BreadcrumbTreeElement::Borrowed(ctx)));
new_context_element
.map(|ctx| new_nodes.push(BreadcrumbTreeElement::Borrowed(ctx.from_context_element())));
@ -287,7 +294,7 @@ impl<'a> DustRenderer<'a> {
_ => new_nodes.push(BreadcrumbTreeElement::Borrowed(ctx)),
}
});
explicit_context.as_ref().map(|path| {
/*explicit_context.as_ref().map(|path| {
// TODO: should resolving the value here use
// explicit_context_maybe_breadcrumbs or
// maybe_breadcrumbs?
@ -300,7 +307,7 @@ impl<'a> DustRenderer<'a> {
new_nodes.push(BreadcrumbTreeElement::Owned(Rc::new(val)));
}
});
});
});*/
Some((parent, new_nodes))
}