mirror of
https://git.proxmox.com/git/proxmox
synced 2025-05-29 19:18:17 +00:00
rrd: avoid intermediate index, directly loop over data
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
6149c171ca
commit
5740f36ef8
@ -177,8 +177,8 @@ impl RRA {
|
|||||||
|
|
||||||
let mut index = self.slot(start);
|
let mut index = self.slot(start);
|
||||||
|
|
||||||
for i in 0..data.len() {
|
for item in data {
|
||||||
if let Some(v) = data[i] {
|
if let Some(v) = item {
|
||||||
self.data[index] = v;
|
self.data[index] = v;
|
||||||
}
|
}
|
||||||
index += 1; if index >= self.data.len() { index = 0; }
|
index += 1; if index >= self.data.len() { index = 0; }
|
||||||
|
Loading…
Reference in New Issue
Block a user