In random collaboration test, add failing assertion for worktree convergence

This commit is contained in:
Max Brunsfeld 2022-02-15 14:55:38 -08:00
parent a11495af19
commit 34bba303dc
5 changed files with 88 additions and 15 deletions

View file

@ -478,6 +478,14 @@ impl<T: Item> SumTree<T> {
}
}
impl<T: Item + PartialEq> PartialEq for SumTree<T> {
fn eq(&self, other: &Self) -> bool {
self.iter().eq(other.iter())
}
}
impl<T: Item + Eq> Eq for SumTree<T> {}
impl<T: KeyedItem> SumTree<T> {
pub fn insert_or_replace(&mut self, item: T, cx: &<T::Summary as Summary>::Context) -> bool {
let mut replaced = false;