PartialEq compiling with double lifetimes.

This commit is contained in:
Tom Alexander 2020-05-10 20:58:47 -04:00
parent 8fd2a9cf39
commit e986a1ba7a
Signed by: talexander
GPG Key ID: D3A179C9A53C0EDE
2 changed files with 9 additions and 6 deletions

View File

@ -40,8 +40,8 @@ pub trait IntoBoxedContextElement {
fn clone_to_box(&self) -> Box<dyn ContextElement>;
}
// impl PartialEq<dyn ContextElement> for dyn ContextElement {
// fn eq(&self, other: &dyn ContextElement) -> bool {
// todo!()
// }
// }
impl<'a, 'b> PartialEq<&'b dyn ContextElement> for &'a dyn ContextElement {
fn eq(&self, other: &&'b dyn ContextElement) -> bool {
false
}
}

View File

@ -245,7 +245,10 @@ impl<'a> DustRenderer<'a> {
RValue::RVPath(path) => walk_path(breadcrumbs, &path.keys),
},
};
if left_side.unwrap().equals(right_side.unwrap()) {
// if left_side.unwrap().equals(right_side.unwrap()) {
// panic!("testing");
// }
if left_side.unwrap() == right_side.unwrap() {
panic!("testing");
}
// let x = WalkError::CantWalk;