Fix randomized tests for concurrent edits

This commit is contained in:
Antonio Scandurra
2021-06-01 16:54:02 +02:00
parent da7e3c8cd8
commit 56efe30558
2 changed files with 35 additions and 11 deletions
+5
View File
@@ -1,6 +1,7 @@
use smallvec::SmallVec;
use std::cmp::{self, Ordering};
use std::ops::{Add, AddAssign};
use std::slice;
pub type ReplicaId = u16;
pub type Seq = u32;
@@ -108,6 +109,10 @@ impl Global {
pub fn changed_since(&self, other: &Self) -> bool {
self.0.iter().any(|t| t.value > other.get(t.replica_id))
}
pub fn iter(&self) -> slice::Iter<Local> {
self.0.iter()
}
}
impl PartialOrd for Global {