From f472209f4208bea1e146be22873d21bc1304db7a Mon Sep 17 00:00:00 2001 From: mo khan Date: Mon, 14 Jul 2025 10:58:19 -0600 Subject: chore: fix more linter errors --- src/authorization/cedar_authorizer.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/authorization/cedar_authorizer.rs') 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( -- cgit v1.2.3