Skip to content

Commit

Permalink
use simplified struct notation
Browse files Browse the repository at this point in the history
  • Loading branch information
jonaspleyer committed Jun 27, 2023
1 parent f8eaa1f commit 3d3eebb
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plotters/src/style/colors/colormaps.rs
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ pub use crate::define_linear_interpolation_color_map;
macro_rules! define_linear_interpolation_color_map{
($color_scale_name:ident, $color_type:ident, $doc:expr, $(($($color_value:expr),+)),*) => {
#[doc = $doc]
pub struct $color_scale_name {}
pub struct $color_scale_name;

impl $color_scale_name {
// const COLORS: [$color_type; $number_colors] = [$($color_type($($color_value),+)),+];
Expand All @@ -287,7 +287,7 @@ macro_rules! define_linear_interpolation_color_map{
};
($color_scale_name:ident, $color_type:ident, $doc:expr, $($color_complete:tt),+) => {
#[doc = $doc]
pub struct $color_scale_name {}
pub struct $color_scale_name;

impl $color_scale_name {
const COLORS: [$color_type; $crate::count!($($color_complete)*)] = $crate::define_colors_from_list_of_values_or_directly!{$($color_complete),+};
Expand Down

0 comments on commit 3d3eebb

Please sign in to comment.