summaryrefslogtreecommitdiff
path: root/src/tools/miri/src/concurrency/vector_clock.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/tools/miri/src/concurrency/vector_clock.rs')
-rw-r--r--src/tools/miri/src/concurrency/vector_clock.rs28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/tools/miri/src/concurrency/vector_clock.rs b/src/tools/miri/src/concurrency/vector_clock.rs
index b36c6be5a72..a6e67ef8699 100644
--- a/src/tools/miri/src/concurrency/vector_clock.rs
+++ b/src/tools/miri/src/concurrency/vector_clock.rs
@@ -212,16 +212,14 @@ impl PartialOrd for VClock {
for (l, r) in iter {
match order {
Ordering::Equal => order = l.cmp(r),
- Ordering::Less => {
+ Ordering::Less =>
if l > r {
return None;
- }
- }
- Ordering::Greater => {
+ },
+ Ordering::Greater =>
if l < r {
return None;
- }
- }
+ },
}
}
@@ -236,16 +234,18 @@ impl PartialOrd for VClock {
Ordering::Equal => Some(order),
// Right has at least 1 element > than the implicit 0,
// so the only valid values are Ordering::Less or None.
- Ordering::Less => match order {
- Ordering::Less | Ordering::Equal => Some(Ordering::Less),
- Ordering::Greater => None,
- },
+ Ordering::Less =>
+ match order {
+ Ordering::Less | Ordering::Equal => Some(Ordering::Less),
+ Ordering::Greater => None,
+ },
// Left has at least 1 element > than the implicit 0,
// so the only valid values are Ordering::Greater or None.
- Ordering::Greater => match order {
- Ordering::Greater | Ordering::Equal => Some(Ordering::Greater),
- Ordering::Less => None,
- },
+ Ordering::Greater =>
+ match order {
+ Ordering::Greater | Ordering::Equal => Some(Ordering::Greater),
+ Ordering::Less => None,
+ },
}
}