Going extreme: removing all fields and unifying all walk errors.

This commit is contained in:
Tom Alexander
2020-05-09 14:00:19 -04:00
parent b20368c586
commit fcb2f3fc4d
3 changed files with 6 additions and 11 deletions

View File

@@ -7,6 +7,7 @@ use crate::parser::TemplateElement;
use crate::renderer::context_element::ContextElement;
use crate::renderer::errors::CompileError;
use crate::renderer::errors::RenderError;
use crate::renderer::errors::WalkError;
use crate::renderer::parameters_context::ParametersContext;
use std::collections::HashMap;
@@ -226,7 +227,7 @@ fn walk_path_from_single_level<'a>(
let mut output = context;
for elem in path.iter() {
let new_val = output.walk(elem);
if let Err(RenderError::CantWalk { .. }) = new_val {
if let Err(WalkError::CantWalk { .. }) = new_val {
return Ok(walk_failure);
}
walk_failure = WalkResult::PartialWalk;