Skip to content

Commit ae3fdd3

Browse files
calebbourgclaude
andcommitted
Fix clippy::never_loop warning in find_by function
Replace for loop that always returns on first iteration with if let Some() pattern as suggested by clippy. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent e086877 commit ae3fdd3

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

entity_api/src/organization.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ pub async fn find_by(
6464
db: &impl ConnectionTrait,
6565
params: HashMap<String, String>,
6666
) -> Result<Vec<Model>, Error> {
67-
for (key, value) in params {
67+
if let Some((key, value)) = params.into_iter().next() {
6868
match key.as_str() {
6969
"user_id" => {
7070
let user_uuid = uuid_parse_str(&value)?;

0 commit comments

Comments
 (0)