Remove iteration_context, parameters_context, and most of bin.rs.

Since I'm changing a pretty core concept of the renderer, I'm going to be rebuilding it piece by piece. In the interest of being able to rapidly change things and check if they are valid through compilation, I need to eliminate most of the old code so I do not have that weighing me down.
This commit is contained in:
Tom Alexander
2020-05-31 18:27:55 -04:00
parent acb8dfb58e
commit b8b4759d45
4 changed files with 283 additions and 282 deletions

View File

@@ -80,17 +80,17 @@ impl<'a> DustRenderer<'a> {
Some(_) => None,
None => maybe_breadcrumbs,
};
let mut new_nodes = Vec::new();
let mut new_nodes: Vec<BreadcrumbTreeElement> = 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() {
// new_nodes.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, maybe_breadcrumbs))
.map(|val| {
if val.is_truthy() {
new_nodes.push(BreadcrumbTreeElement::Borrowed(val.from_context_element()))
}
});
});
injected_context.map(|ctx| new_nodes.push(BreadcrumbTreeElement::Borrowed(ctx)));
new_context_element
.map(|ctx| new_nodes.push(BreadcrumbTreeElement::Borrowed(ctx.from_context_element())));