fix: resolve clippy manual_flatten warning in snapshot

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Rasyidan Akbar F. 2026-04-12 14:41:01 +07:00
commit 5f1d9e6d24

View file

@ -102,12 +102,10 @@ fn resolve_manifest_source_with(
env_value: Option<&str>,
config_value: Option<&str>,
) -> Result<String, IdxError> {
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());
}
}