Skip to content

Commit 18428b1

Browse files
committed
Derive Clone for Take and MaybeSlice
1 parent bb621cc commit 18428b1

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/gradient.rs

+2
Original file line numberDiff line numberDiff line change
@@ -111,6 +111,7 @@ impl<C: Mix + Clone> Gradient<C> {
111111
}
112112

113113
///An iterator over interpolated colors.
114+
#[derive(Clone)]
114115
pub struct Take<'a, C: Mix + Clone + 'a> {
115116
gradient: MaybeSlice<'a, C>,
116117
from: C::Scalar,
@@ -273,6 +274,7 @@ impl<T: Float> From<::std::ops::RangeFull> for Range<T> {
273274
}
274275
}
275276

277+
#[derive(Clone)]
276278
enum MaybeSlice<'a, C: Mix + Clone + 'a> {
277279
NotSlice(&'a Gradient<C>),
278280
Slice(Slice<'a, C>),

0 commit comments

Comments
 (0)