aboutsummaryrefslogtreecommitdiff
path: root/src/model/permission.rs
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2022-01-04 18:59:17 +0100
committerAlex Auvolat <alex@adnab.me>2022-01-04 18:59:17 +0100
commit677ab60cc117677bf53dc4887a6ff1c094e17cd0 (patch)
treedeed8c5e3a0e22fa0d1d987d4ca1313fd5c54fb7 /src/model/permission.rs
parentdf35feba18787cac06b2a87e3426752fb78da2d5 (diff)
downloadgarage-677ab60cc117677bf53dc4887a6ff1c094e17cd0.tar.gz
garage-677ab60cc117677bf53dc4887a6ff1c094e17cd0.zip
Small changes in key model and refactoringnew-buckets
Diffstat (limited to 'src/model/permission.rs')
-rw-r--r--src/model/permission.rs14
1 files changed, 6 insertions, 8 deletions
diff --git a/src/model/permission.rs b/src/model/permission.rs
index b8f7dd71..67527ed0 100644
--- a/src/model/permission.rs
+++ b/src/model/permission.rs
@@ -21,14 +21,12 @@ pub struct BucketKeyPerm {
}
impl BucketKeyPerm {
- pub fn no_permissions() -> Self {
- Self {
- timestamp: 0,
- allow_read: false,
- allow_write: false,
- allow_owner: false,
- }
- }
+ pub const NO_PERMISSIONS: Self = Self {
+ timestamp: 0,
+ allow_read: false,
+ allow_write: false,
+ allow_owner: false,
+ };
}
impl Crdt for BucketKeyPerm {