Running into lifetime issues.
This commit is contained in:
parent
c8cf6a78a0
commit
7e0e776486
@ -25,3 +25,9 @@ pub trait Loopable {
|
|||||||
/// for each element of the array.
|
/// for each element of the array.
|
||||||
fn get_loop_elements(&self) -> Vec<&dyn ContextElement>;
|
fn get_loop_elements(&self) -> Vec<&dyn ContextElement>;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl PartialEq<dyn ContextElement> for dyn ContextElement {
|
||||||
|
fn eq(&self, other: &dyn ContextElement) -> bool {
|
||||||
|
todo!()
|
||||||
|
}
|
||||||
|
}
|
||||||
|
@ -9,6 +9,7 @@ pub enum RenderError {
|
|||||||
TemplateNotFound(String),
|
TemplateNotFound(String),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[derive(PartialEq)]
|
||||||
pub enum WalkError {
|
pub enum WalkError {
|
||||||
CantWalk,
|
CantWalk,
|
||||||
}
|
}
|
||||||
|
@ -225,7 +225,7 @@ impl<'a> DustRenderer<'a> {
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
DustTag::DTHelperEquals(parameterized_block) => {
|
DustTag::DTHelperEquals(parameterized_block) => {
|
||||||
let param_map: HashMap<&'a str, &'a RValue<'a>> = parameterized_block
|
let param_map: HashMap<&str, &RValue<'a>> = parameterized_block
|
||||||
.params
|
.params
|
||||||
.iter()
|
.iter()
|
||||||
.map(|pair: &KVPair<'a>| (pair.key, &pair.value))
|
.map(|pair: &KVPair<'a>| (pair.key, &pair.value))
|
||||||
@ -245,6 +245,14 @@ impl<'a> DustRenderer<'a> {
|
|||||||
RValue::RVPath(path) => walk_path(breadcrumbs, &path.keys),
|
RValue::RVPath(path) => walk_path(breadcrumbs, &path.keys),
|
||||||
},
|
},
|
||||||
};
|
};
|
||||||
|
// let x = WalkError::CantWalk;
|
||||||
|
// let y = WalkError::CantWalk;
|
||||||
|
// if x == y {
|
||||||
|
// panic!("placeholder");
|
||||||
|
// }
|
||||||
|
// if left_side.unwrap() == right_side.unwrap() {
|
||||||
|
// panic!("placeholder");
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
_ => (), // TODO: Implement the rest
|
_ => (), // TODO: Implement the rest
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user