Skip to content

Commit

Permalink
Add clone derives
Browse files Browse the repository at this point in the history
  • Loading branch information
ScottyThePilot committed Nov 18, 2023
1 parent 1a7f33d commit 5dfb25c
Showing 1 changed file with 2 additions and 25 deletions.
27 changes: 2 additions & 25 deletions src/buffer_par.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -59,18 +60,6 @@ where
}
}

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

impl<P> fmt::Debug for PixelsPar<'_, P>
where
P: Pixel + Sync,
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -221,19 +211,6 @@ where
}
}

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

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

0 comments on commit 5dfb25c

Please sign in to comment.