Skip to content

Commit da5ea89

Browse files
committed
Small cleanup for mapping values.
1 parent 4582f86 commit da5ea89

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/color.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ impl RGBA {
8484
alpha: Option<f32>,
8585
) -> Self {
8686
Self::new(
87-
red.map(|r| clamp_unit_f32(r)),
88-
green.map(|g| clamp_unit_f32(g)),
89-
blue.map(|b| clamp_unit_f32(b)),
87+
red.map(clamp_unit_f32),
88+
green.map(clamp_unit_f32),
89+
blue.map(clamp_unit_f32),
9090
alpha.map(|a| a.clamp(0.0, OPAQUE)),
9191
)
9292
}

0 commit comments

Comments
 (0)