rrd: avoid intermediate index, directly loop over data
Signed-off-by: Thomas Lamprecht <t.lamprecht@proxmox.com>
This commit is contained in:
		| @ -177,8 +177,8 @@ impl RRA { | ||||
|  | ||||
|         let mut index = self.slot(start); | ||||
|  | ||||
|         for i in 0..data.len() { | ||||
|             if let Some(v) = data[i] { | ||||
|         for item in data { | ||||
|             if let Some(v) = item { | ||||
|                 self.data[index] = v; | ||||
|             } | ||||
|             index += 1; if index >= self.data.len() { index = 0; } | ||||
|  | ||||
		Reference in New Issue
	
	Block a user