Skip to content

Commit 4bb8700

Browse files
committed
fix: Collapse nested if for clippy collapsible_if lint
Assisted-By: Claude (Anthropic AI) <noreply@anthropic.com> Signed-off-by: Paolo Dettori <dettori@us.ibm.com>
1 parent 85bade2 commit 4bb8700

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

crates/openshell-server/src/auth/ownership.rs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -299,10 +299,8 @@ pub async fn resolve_scoped_name(
299299
.await
300300
.map_err(|e| Status::internal(format!("suffix search failed: {e}")))?;
301301

302-
if is_admin {
303-
if let Some(record) = candidates.into_iter().next() {
304-
return Ok(Some(record));
305-
}
302+
if is_admin && let Some(record) = candidates.into_iter().next() {
303+
return Ok(Some(record));
306304
}
307305

308306
Ok(None)

0 commit comments

Comments
 (0)