Minor doc and instance changes
Signed-off-by: Alexis Sellier<alexis@radicle.xyz>
This commit is contained in:
parent
fee0296910
commit
a79c95283b
|
|
@ -5,7 +5,7 @@ use crate::Semilattice;
|
||||||
/// The "redacted" state is the top-most element and takes precedence
|
/// The "redacted" state is the top-most element and takes precedence
|
||||||
/// over other states.
|
/// over other states.
|
||||||
///
|
///
|
||||||
/// There is no `Default` instance, as it wouldn't obbey semilattice laws.
|
/// There is no `Default` instance, since this is not a "bounded" semilattice.
|
||||||
///
|
///
|
||||||
/// Nb. The merge rules are such that if two redactables with different
|
/// Nb. The merge rules are such that if two redactables with different
|
||||||
/// values present are merged; the result is redacted. This is the preserve
|
/// values present are merged; the result is redacted. This is the preserve
|
||||||
|
|
|
||||||
|
|
@ -1,3 +1,4 @@
|
||||||
|
use std::cmp::Ordering;
|
||||||
use std::collections::btree_map::Entry;
|
use std::collections::btree_map::Entry;
|
||||||
use std::collections::BTreeMap;
|
use std::collections::BTreeMap;
|
||||||
use std::ops::{ControlFlow, Deref, DerefMut};
|
use std::ops::{ControlFlow, Deref, DerefMut};
|
||||||
|
|
@ -42,9 +43,13 @@ impl Comment {
|
||||||
}
|
}
|
||||||
|
|
||||||
impl PartialOrd for Comment {
|
impl PartialOrd for Comment {
|
||||||
fn partial_cmp(&self, _other: &Self) -> Option<std::cmp::Ordering> {
|
fn partial_cmp(&self, other: &Self) -> Option<Ordering> {
|
||||||
|
if self == other {
|
||||||
|
Some(Ordering::Equal)
|
||||||
|
} else {
|
||||||
None
|
None
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/// An action that can be carried out in a change.
|
/// An action that can be carried out in a change.
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue