rrd: avoid intermediate index, directly loop over data
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
parent
c19af51ecb
commit
ac20cb1f65
|
@ -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