diff options
| author | mo khan <mo@mokhan.ca> | 2025-07-14 10:58:19 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-07-14 10:58:19 -0600 |
| commit | f472209f4208bea1e146be22873d21bc1304db7a (patch) | |
| tree | 4521a0b6688c9c2894e5334b90f23da28c477e3a /src/authorization/cedar_authorizer.rs | |
| parent | ecfa8f62b7a2df98428128cc68d59a47d4130afc (diff) | |
chore: fix more linter errors
Diffstat (limited to 'src/authorization/cedar_authorizer.rs')
| -rw-r--r-- | src/authorization/cedar_authorizer.rs | 6 |
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( |
