We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents b9ec60b + 62e3f32 commit 04483e5Copy full SHA for 04483e5
plotters/src/style/colors/colormaps.rs
@@ -41,9 +41,7 @@ impl<ColorType: crate::style::Color + Clone> DerivedColorMap<ColorType> {
41
/// This function lets the user define a new colormap by simply specifying colors in the correct order.
42
/// For calculation of the color values, the colors will be spaced evenly apart.
43
pub fn new(colors: &[ColorType]) -> Self {
44
- DerivedColorMap {
45
- colors: colors.iter().map(|color| color.clone()).collect::<Vec<_>>(),
46
- }
+ DerivedColorMap { colors: colors.iter().cloned().collect() }
47
}
48
49
0 commit comments