summaryrefslogtreecommitdiff
path: root/src/authorization/cedar_authorizer.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/authorization/cedar_authorizer.rs')
-rw-r--r--src/authorization/cedar_authorizer.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/authorization/cedar_authorizer.rs b/src/authorization/cedar_authorizer.rs
index ed639f28..0d30ee77 100644
--- a/src/authorization/cedar_authorizer.rs
+++ b/src/authorization/cedar_authorizer.rs
@@ -42,8 +42,8 @@ impl CedarAuthorizer {
return Ok(cedar_policy::PolicySet::default());
}
- if path.is_file() && path.extension().map_or(false, |ext| ext == "cedar") {
- let content = fs::read_to_string(&path)?;
+ if path.is_file() && path.extension().is_some_and(|ext| ext == "cedar") {
+ let content = fs::read_to_string(path)?;
return Ok(cedar_policy::PolicySet::from_str(&content)?);
}
@@ -55,7 +55,7 @@ impl CedarAuthorizer {
for entry in fs::read_dir(path)? {
policies.merge(&Self::load_from(&entry?.path())?, true)?;
}
- return Ok(policies);
+ Ok(policies)
}
fn map_from(