mirror of
https://git.proxmox.com/git/proxmox-backup
synced 2025-07-12 06:44:20 +00:00
cleanup rrd bounds checks in datastore status call
Signed-off-by: Wolfgang Bumiller <w.bumiller@proxmox.com>
This commit is contained in:
parent
84283eabb0
commit
6d1f8b4b51
@ -102,10 +102,10 @@ pub async fn datastore_status(
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
let total = if idx < avail.data.len() && avail.data[idx].is_some() {
|
let total = if let Some(avail) = avail.get(idx) {
|
||||||
avail.data[idx].unwrap() + used
|
avail + used
|
||||||
} else if idx < total_entry.data.len() && total_entry.data[idx].is_some() {
|
} else if let Some(total) = total_entry.get(idx) {
|
||||||
total_entry.data[idx].unwrap()
|
total
|
||||||
} else {
|
} else {
|
||||||
history.push(None);
|
history.push(None);
|
||||||
continue;
|
continue;
|
||||||
|
Loading…
Reference in New Issue
Block a user