From 5dfb25cd4f1290468e124bae6103dee0a3846035 Mon Sep 17 00:00:00 2001 From: ScottyThePilot Date: Sat, 18 Nov 2023 15:02:47 -0500 Subject: [PATCH] Add clone derives --- src/buffer_par.rs | 27 ++------------------------- 1 file changed, 2 insertions(+), 25 deletions(-) diff --git a/src/buffer_par.rs b/src/buffer_par.rs index 232cdc5d25..aa90a86664 100644 --- a/src/buffer_par.rs +++ b/src/buffer_par.rs @@ -8,6 +8,7 @@ use crate::traits::Pixel; use crate::ImageBuffer; /// Parallel iterator over pixel refs. +#[derive(Clone)] pub struct PixelsPar<'a, P> where P: Pixel + Sync + 'a, @@ -59,18 +60,6 @@ where } } -impl

Clone for PixelsPar<'_, P> -where - P: Pixel + Sync, - P::Subpixel: Sync, -{ - fn clone(&self) -> Self { - PixelsPar { - chunks: self.chunks.clone(), - } - } -} - impl

fmt::Debug for PixelsPar<'_, P> where P: Pixel + Sync, @@ -148,6 +137,7 @@ where } /// Parallel iterator over pixel refs and their coordinates. +#[derive(Clone)] pub struct EnumeratePixelsPar<'a, P> where P: Pixel + Sync + 'a, @@ -221,19 +211,6 @@ where } } -impl

Clone for EnumeratePixelsPar<'_, P> -where - P: Pixel + Sync, - P::Subpixel: Sync, -{ - fn clone(&self) -> Self { - EnumeratePixelsPar { - pixels: self.pixels.clone(), - width: self.width, - } - } -} - impl

fmt::Debug for EnumeratePixelsPar<'_, P> where P: Pixel + Sync,