From 5f1d9e6d249905f1b6992bd59ca58ad35dddea29 Mon Sep 17 00:00:00 2001 From: 0xrsydn Date: Sun, 12 Apr 2026 14:41:01 +0700 Subject: [PATCH] fix: resolve clippy manual_flatten warning in snapshot Co-Authored-By: Claude Opus 4.6 (1M context) --- src/ownership/snapshot.rs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/src/ownership/snapshot.rs b/src/ownership/snapshot.rs index b0209b9..9d26cd1 100644 --- a/src/ownership/snapshot.rs +++ b/src/ownership/snapshot.rs @@ -102,12 +102,10 @@ fn resolve_manifest_source_with( env_value: Option<&str>, config_value: Option<&str>, ) -> Result { - for value in [explicit, env_value, config_value] { - if let Some(value) = value { - let trimmed = value.trim(); - if !trimmed.is_empty() { - return Ok(trimmed.to_string()); - } + for value in [explicit, env_value, config_value].into_iter().flatten() { + let trimmed = value.trim(); + if !trimmed.is_empty() { + return Ok(trimmed.to_string()); } }