aboutsummaryrefslogtreecommitdiff
path: root/src/util/crdt/lww_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/lww_map.rs
parentb76d0580a03c38d901a2b3d19e7c6ede6b0d09a7 (diff)
downloadgarage-c7d5c732442c5802058b46205d450d4620772b7b.tar.gz
garage-c7d5c732442c5802058b46205d450d4620772b7b.zip
Add must_use to some CRDT functions
Diffstat (limited to 'src/util/crdt/lww_map.rs')
-rw-r--r--src/util/crdt/lww_map.rs1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/util/crdt/lww_map.rs b/src/util/crdt/lww_map.rs
index f3a90591..1746c3cc 100644
--- a/src/util/crdt/lww_map.rs
+++ b/src/util/crdt/lww_map.rs
@@ -63,6 +63,7 @@ where
///
/// However extracting the mutator on its own and only sending that on the network is very
/// interesting as it is much smaller than the whole map.
+ #[must_use = "CRDT mutators are meant to be merged into a CRDT and not ignored."]
pub fn update_mutator(&self, k: K, new_v: V) -> Self {
let new_vals = match self.vals.binary_search_by(|(k2, _, _)| k2.cmp(&k)) {
Ok(i) => {