From e4d660aff9fd1285706410ef4a23d1442af7dd6f Mon Sep 17 00:00:00 2001 From: Alex Moon Date: Wed, 18 Sep 2024 11:33:33 -0400 Subject: [PATCH] Derive `Clone` impl for ranged combinators --- plotters/src/coord/ranged1d/combinators/ckps.rs | 1 + plotters/src/coord/ranged1d/combinators/logarithmic.rs | 1 + plotters/src/coord/ranged1d/combinators/nested.rs | 1 + 3 files changed, 3 insertions(+) diff --git a/plotters/src/coord/ranged1d/combinators/ckps.rs b/plotters/src/coord/ranged1d/combinators/ckps.rs index 402ffd8c..cdaaf922 100644 --- a/plotters/src/coord/ranged1d/combinators/ckps.rs +++ b/plotters/src/coord/ranged1d/combinators/ckps.rs @@ -13,6 +13,7 @@ use crate::coord::ranged1d::{AsRangedCoord, DiscreteRanged, KeyPointHint, Ranged /// for details. /// Note: For any coordinate spec wrapped by this decorator, the maximum number of labels configured by /// MeshStyle will be ignored and the key point function will always returns the entire vector +#[derive(Clone)] pub struct WithKeyPoints { inner: Inner, bold_points: Vec, diff --git a/plotters/src/coord/ranged1d/combinators/logarithmic.rs b/plotters/src/coord/ranged1d/combinators/logarithmic.rs index cd1dfd5b..af9e1398 100644 --- a/plotters/src/coord/ranged1d/combinators/logarithmic.rs +++ b/plotters/src/coord/ranged1d/combinators/logarithmic.rs @@ -151,6 +151,7 @@ impl AsRangedCoord for LogRangeExt { } /// A log scaled coordinate axis +#[derive(Clone)] pub struct LogCoord { linear: RangedCoordf64, logic: Range, diff --git a/plotters/src/coord/ranged1d/combinators/nested.rs b/plotters/src/coord/ranged1d/combinators/nested.rs index e4a493ec..379f2d4f 100644 --- a/plotters/src/coord/ranged1d/combinators/nested.rs +++ b/plotters/src/coord/ranged1d/combinators/nested.rs @@ -45,6 +45,7 @@ impl From for NestedValue { /// for each value in discrete value, there is a secondary coordinate system. /// And the value is defined as a tuple of primary coordinate value and secondary /// coordinate value +#[derive(Clone)] pub struct NestedRange { primary: Primary, secondary: Vec,