aboutsummaryrefslogtreecommitdiff
path: root/src/model/key_table.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/model/key_table.rs')
-rw-r--r--src/model/key_table.rs3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/model/key_table.rs b/src/model/key_table.rs
index d5e30f3f..330e83f0 100644
--- a/src/model/key_table.rs
+++ b/src/model/key_table.rs
@@ -106,8 +106,7 @@ impl Key {
/// Get permissions for a bucket
pub fn bucket_permissions(&self, bucket: &Uuid) -> BucketKeyPerm {
self.params()
- .map(|params| params.authorized_buckets.get(bucket))
- .flatten()
+ .and_then(|params| params.authorized_buckets.get(bucket))
.cloned()
.unwrap_or(BucketKeyPerm::NO_PERMISSIONS)
}