src/bin/proxmox-backup-client.rs: cleanup
This commit is contained in:
parent
024f11bb55
commit
98f0b97293
@ -606,13 +606,13 @@ fn complete_backup_group(arg: &str, param: &HashMap<String, String>) -> Vec<Stri
|
|||||||
|
|
||||||
if let Some(list) = resp["data"].as_array() {
|
if let Some(list) = resp["data"].as_array() {
|
||||||
for item in list {
|
for item in list {
|
||||||
if let Some(backup_id) = item["backup-id"].as_str() {
|
if let (Some(backup_id), Some(backup_type)) =
|
||||||
if let Some(backup_type) = item["backup-type"].as_str() {
|
(item["backup-id"].as_str(), item["backup-type"].as_str())
|
||||||
|
{
|
||||||
result.push(format!("{}/{}", backup_type, backup_id));
|
result.push(format!("{}/{}", backup_type, backup_id));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
result
|
result
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user