summaryrefslogtreecommitdiffstats
path: root/src/color.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/color.rs')
-rw-r--r--src/color.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/color.rs b/src/color.rs
index 64fd82b..5d50aa1 100644
--- a/src/color.rs
+++ b/src/color.rs
@@ -77,8 +77,8 @@ impl ColorSpace for RgbSpace {
}
len += 1;
}
- for i in 0..3 {
- sum[i] /= len as f64;
+ for s in &mut sum {
+ *s /= len as f64;
}
Self(sum)
}
@@ -197,8 +197,8 @@ impl ColorSpace for LabSpace {
}
len += 1;
}
- for i in 0..3 {
- sum[i] /= len as f64;
+ for s in &mut sum {
+ *s /= len as f64;
}
Self(sum)
}
@@ -277,8 +277,8 @@ impl ColorSpace for LuvSpace {
}
len += 1;
}
- for i in 0..3 {
- sum[i] /= len as f64;
+ for s in &mut sum {
+ *s /= len as f64;
}
Self(sum)
}