From 2ab9a07b64d4badb3671ed5065c520ff9bb83038 Mon Sep 17 00:00:00 2001 From: Sam Lakerveld Date: Tue, 8 Aug 2023 11:22:01 +0200 Subject: embassy-sync: manual Copy impls for channel and pipe --- embassy-sync/src/pipe.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'embassy-sync/src/pipe.rs') diff --git a/embassy-sync/src/pipe.rs b/embassy-sync/src/pipe.rs index 6e3e77b49..21d451ea6 100644 --- a/embassy-sync/src/pipe.rs +++ b/embassy-sync/src/pipe.rs @@ -11,7 +11,6 @@ use crate::ring_buffer::RingBuffer; use crate::waitqueue::WakerRegistration; /// Write-only access to a [`Pipe`]. -#[derive(Copy)] pub struct Writer<'p, M, const N: usize> where M: RawMutex, @@ -28,6 +27,8 @@ where } } +impl<'p, M, const N: usize> Copy for Writer<'p, M, N> where M: RawMutex {} + impl<'p, M, const N: usize> Writer<'p, M, N> where M: RawMutex, @@ -74,7 +75,6 @@ where impl<'p, M, const N: usize> Unpin for WriteFuture<'p, M, N> where M: RawMutex {} /// Read-only access to a [`Pipe`]. -#[derive(Copy)] pub struct Reader<'p, M, const N: usize> where M: RawMutex, @@ -91,6 +91,8 @@ where } } +impl<'p, M, const N: usize> Copy for Reader<'p, M, N> where M: RawMutex {} + impl<'p, M, const N: usize> Reader<'p, M, N> where M: RawMutex, -- cgit