aboutsummaryrefslogtreecommitdiff
path: root/src/util
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-01-07 16:23:04 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-13 17:27:16 +0100
commitbed3106c6a4cbdc7257eb88060fc04ec84340ee4 (patch)
tree6237fb5a7a49208c3c990b1b7b3955d35124da19 /src/util
parent60c0033c8bbd3dbc18f8c91f15674a60fd8acdc0 (diff)
downloadgarage-bed3106c6a4cbdc7257eb88060fc04ec84340ee4.tar.gz
garage-bed3106c6a4cbdc7257eb88060fc04ec84340ee4.zip
Implement {Put,Get,Delete}BucketCors and CORS in web server
Diffstat (limited to 'src/util')
-rw-r--r--src/util/crdt/lww.rs12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/util/crdt/lww.rs b/src/util/crdt/lww.rs
index adb07711..254abe8e 100644
--- a/src/util/crdt/lww.rs
+++ b/src/util/crdt/lww.rs
@@ -125,3 +125,15 @@ where
}
}
}
+
+impl<T> Default for Lww<T>
+where
+ T: Default,
+{
+ fn default() -> Self {
+ Self {
+ ts: 0,
+ v: T::default(),
+ }
+ }
+}