aboutsummaryrefslogtreecommitdiff
path: root/src/util/crdt/map.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2021-12-22 09:57:02 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-04 12:47:28 +0100
commitc7d5c732442c5802058b46205d450d4620772b7b (patch)
tree8da97b3464d308b0ad4130820c712dd5c6ecd786 /src/util/crdt/map.rs
parentb76d0580a03c38d901a2b3d19e7c6ede6b0d09a7 (diff)
downloadgarage-c7d5c732442c5802058b46205d450d4620772b7b.tar.gz
garage-c7d5c732442c5802058b46205d450d4620772b7b.zip
Add must_use to some CRDT functions
Diffstat (limited to 'src/util/crdt/map.rs')
-rw-r--r--src/util/crdt/map.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/crdt/map.rs b/src/util/crdt/map.rs
index 7553cd50..ad9a6e55 100644
--- a/src/util/crdt/map.rs
+++ b/src/util/crdt/map.rs
@@ -33,6 +33,7 @@ where
/// This can be used to build a delta-mutator:
/// when merged with another map, the value will be added or CRDT-merged if a previous
/// value already exists.
+ #[must_use = "CRDT mutators are meant to be merged into a CRDT and not ignored."]
pub fn put_mutator(k: K, v: V) -> Self {
Self { vals: vec![(k, v)] }
}