diff options
author | Alex Auvolat <alex@adnab.me> | 2022-01-07 16:23:04 +0100 |
---|---|---|
committer | Alex Auvolat <alex@adnab.me> | 2022-01-24 11:58:00 +0100 |
commit | ea7fb901ebc316bba53d248a2f8bd7a3455f5791 (patch) | |
tree | 31da306e4c0b866bb9cc4241d6b01eac6c74bd49 /src/util/crdt | |
parent | 820924534ab3eb0b2544a594881591559e7c45a5 (diff) | |
download | garage-ea7fb901ebc316bba53d248a2f8bd7a3455f5791.tar.gz garage-ea7fb901ebc316bba53d248a2f8bd7a3455f5791.zip |
Implement {Put,Get,Delete}BucketCors and CORS in general
- OPTIONS request against API endpoint
- Returning corresponding CORS headers on API calls
- Returning corresponding CORS headers on website GET's
Diffstat (limited to 'src/util/crdt')
-rw-r--r-- | src/util/crdt/lww.rs | 12 |
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(), + } + } +} |