aboutsummaryrefslogtreecommitdiff
path: root/embassy-sync/src/pipe.rs
diff options
context:
space:
mode:
authorSam Lakerveld <[email protected]>2023-08-08 11:22:01 +0200
committerSam Lakerveld <[email protected]>2023-08-08 11:22:01 +0200
commit2ab9a07b64d4badb3671ed5065c520ff9bb83038 (patch)
tree686aa30c13c67f14e6374140365a3fae1d64ae88 /embassy-sync/src/pipe.rs
parent5d5cd2371504915a531e669dce3558485a51a2e1 (diff)
embassy-sync: manual Copy impls for channel and pipe
Diffstat (limited to 'embassy-sync/src/pipe.rs')
-rw-r--r--embassy-sync/src/pipe.rs6
1 files changed, 4 insertions, 2 deletions
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;
11use crate::waitqueue::WakerRegistration; 11use crate::waitqueue::WakerRegistration;
12 12
13/// Write-only access to a [`Pipe`]. 13/// Write-only access to a [`Pipe`].
14#[derive(Copy)]
15pub struct Writer<'p, M, const N: usize> 14pub struct Writer<'p, M, const N: usize>
16where 15where
17 M: RawMutex, 16 M: RawMutex,
@@ -28,6 +27,8 @@ where
28 } 27 }
29} 28}
30 29
30impl<'p, M, const N: usize> Copy for Writer<'p, M, N> where M: RawMutex {}
31
31impl<'p, M, const N: usize> Writer<'p, M, N> 32impl<'p, M, const N: usize> Writer<'p, M, N>
32where 33where
33 M: RawMutex, 34 M: RawMutex,
@@ -74,7 +75,6 @@ where
74impl<'p, M, const N: usize> Unpin for WriteFuture<'p, M, N> where M: RawMutex {} 75impl<'p, M, const N: usize> Unpin for WriteFuture<'p, M, N> where M: RawMutex {}
75 76
76/// Read-only access to a [`Pipe`]. 77/// Read-only access to a [`Pipe`].
77#[derive(Copy)]
78pub struct Reader<'p, M, const N: usize> 78pub struct Reader<'p, M, const N: usize>
79where 79where
80 M: RawMutex, 80 M: RawMutex,
@@ -91,6 +91,8 @@ where
91 } 91 }
92} 92}
93 93
94impl<'p, M, const N: usize> Copy for Reader<'p, M, N> where M: RawMutex {}
95
94impl<'p, M, const N: usize> Reader<'p, M, N> 96impl<'p, M, const N: usize> Reader<'p, M, N>
95where 97where
96 M: RawMutex, 98 M: RawMutex,