mirror of
https://github.com/0xrsydn/idx-cli.git
synced 2026-08-07 01:33:52 +00:00
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:
parent
aad29eaf23
commit
5f1d9e6d24
1 changed files with 4 additions and 6 deletions
|
|
@ -102,14 +102,12 @@ 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 {
|
||||
for value in [explicit, env_value, config_value].into_iter().flatten() {
|
||||
let trimmed = value.trim();
|
||||
if !trimmed.is_empty() {
|
||||
return Ok(trimmed.to_string());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Ok(DEFAULT_SNAPSHOT_MANIFEST_URL.to_string())
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue