Skip to content

Commit 04483e5

Browse files
committed
Merge remote-tracking branch 'refs/remotes/origin/master'
2 parents b9ec60b + 62e3f32 commit 04483e5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

plotters/src/style/colors/colormaps.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,7 @@ impl<ColorType: crate::style::Color + Clone> DerivedColorMap<ColorType> {
4141
/// This function lets the user define a new colormap by simply specifying colors in the correct order.
4242
/// For calculation of the color values, the colors will be spaced evenly apart.
4343
pub fn new(colors: &[ColorType]) -> Self {
44-
DerivedColorMap {
45-
colors: colors.iter().map(|color| color.clone()).collect::<Vec<_>>(),
46-
}
44+
DerivedColorMap { colors: colors.iter().cloned().collect() }
4745
}
4846
}
4947

0 commit comments

Comments
 (0)