mirror of
https://github.com/deuxfleurs-org/garage.git
synced 2026-08-11 23:06:54 +00:00
docs: various fixes in Rust code documentation
- add backticks on struct doc comments lint message: unclosed HTML tag `M` - add a blanck line for proper doc formating lint message: doc list item without indentation help: if this is supposed to be its own paragraph, add a blank line help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#doc_lazy_continuation - fix hyperlink in doc + one url invalid lint message: this URL is not a hyperlink note: bare URLs are not automatically turned into clickable links - ajust space in doc lint message: doc list item overindented help: for further information visit https://rust-lang.github.io/rust-clippy/rust-1.92.0/index.html#doc_overindented_list_items
This commit is contained in:
@@ -26,14 +26,14 @@ pub trait Crdt {
|
||||
fn merge(&mut self, other: &Self);
|
||||
}
|
||||
|
||||
/// Option<T> implements Crdt for any type T, even if T doesn't implement CRDT itself: when
|
||||
/// `Option<T>` implements Crdt for any type T, even if T doesn't implement CRDT itself: when
|
||||
/// different values are detected, they are always merged to None. This can be used for value
|
||||
/// types which shoulnd't be merged, instead of trying to merge things when we know we don't want
|
||||
/// to merge them (which is what the AutoCrdt trait is used for most of the time). This cases
|
||||
/// arises very often, for example with a Lww or a LwwMap: the value type has to be a CRDT so that
|
||||
/// we have a rule for what to do when timestamps aren't enough to disambiguate (in a distributed
|
||||
/// system, anything can happen!), and with AutoCrdt the rule is to make an arbitrary (but
|
||||
/// deterministic) choice between the two. When using an Option<T> instead with this impl, ambiguity
|
||||
/// deterministic) choice between the two. When using an `Option<T>` instead with this impl, ambiguity
|
||||
/// cases are explicitly stored as None, which allows us to detect the ambiguity and handle it in
|
||||
/// the way we want. (this can only work if we are happy with losing the value when an ambiguity
|
||||
/// arises)
|
||||
|
||||
Reference in New Issue
Block a user