summaryrefslogtreecommitdiffstats
path: root/src/color.rs
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2020-05-11 11:33:45 -0400
committerTavian Barnes <tavianator@tavianator.com>2020-05-11 11:33:45 -0400
commitadaafdd7043507cbceae65e78c38954e47103b5c (patch)
treec8e2b62b2f39e0f2dc7908ca613df92dd7b541c1 /src/color.rs
parent825515439247853af3714d3135051a83bd84d2e0 (diff)
downloadkd-forest-adaafdd7043507cbceae65e78c38954e47103b5c.tar.xz
Fix some clippy lints
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)
}