From adbc2368364ab05f49e5bb866f973e4b09e2e57f Mon Sep 17 00:00:00 2001 From: Tom Alexander Date: Sat, 6 Jun 2020 16:03:02 -0400 Subject: [PATCH] Broke the problem area down into parts to make it easier to debug. --- src/renderer/renderer.rs | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/renderer/renderer.rs b/src/renderer/renderer.rs index f61ec48..0fc98f8 100644 --- a/src/renderer/renderer.rs +++ b/src/renderer/renderer.rs @@ -220,7 +220,14 @@ impl<'a> DustRenderer<'a> { }; let mut new_nodes: Vec = 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)) }