diff options
| -rw-r--r-- | embassy-sync/src/channel.rs | 8 | ||||
| -rw-r--r-- | embassy-sync/src/pipe.rs | 2 | ||||
| -rw-r--r-- | embassy-sync/src/priority_channel.rs | 4 | ||||
| -rw-r--r-- | embassy-sync/src/waitqueue/multi_waker.rs | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/embassy-sync/src/channel.rs b/embassy-sync/src/channel.rs index f9f71d026..b124a885f 100644 --- a/embassy-sync/src/channel.rs +++ b/embassy-sync/src/channel.rs | |||
| @@ -42,7 +42,7 @@ where | |||
| 42 | M: RawMutex, | 42 | M: RawMutex, |
| 43 | { | 43 | { |
| 44 | fn clone(&self) -> Self { | 44 | fn clone(&self) -> Self { |
| 45 | Sender { channel: self.channel } | 45 | *self |
| 46 | } | 46 | } |
| 47 | } | 47 | } |
| 48 | 48 | ||
| @@ -81,7 +81,7 @@ pub struct DynamicSender<'ch, T> { | |||
| 81 | 81 | ||
| 82 | impl<'ch, T> Clone for DynamicSender<'ch, T> { | 82 | impl<'ch, T> Clone for DynamicSender<'ch, T> { |
| 83 | fn clone(&self) -> Self { | 83 | fn clone(&self) -> Self { |
| 84 | DynamicSender { channel: self.channel } | 84 | *self |
| 85 | } | 85 | } |
| 86 | } | 86 | } |
| 87 | 87 | ||
| @@ -135,7 +135,7 @@ where | |||
| 135 | M: RawMutex, | 135 | M: RawMutex, |
| 136 | { | 136 | { |
| 137 | fn clone(&self) -> Self { | 137 | fn clone(&self) -> Self { |
| 138 | Receiver { channel: self.channel } | 138 | *self |
| 139 | } | 139 | } |
| 140 | } | 140 | } |
| 141 | 141 | ||
| @@ -188,7 +188,7 @@ pub struct DynamicReceiver<'ch, T> { | |||
| 188 | 188 | ||
| 189 | impl<'ch, T> Clone for DynamicReceiver<'ch, T> { | 189 | impl<'ch, T> Clone for DynamicReceiver<'ch, T> { |
| 190 | fn clone(&self) -> Self { | 190 | fn clone(&self) -> Self { |
| 191 | DynamicReceiver { channel: self.channel } | 191 | *self |
| 192 | } | 192 | } |
| 193 | } | 193 | } |
| 194 | 194 | ||
diff --git a/embassy-sync/src/pipe.rs b/embassy-sync/src/pipe.rs index 42fe8ebd0..cd5b8ed75 100644 --- a/embassy-sync/src/pipe.rs +++ b/embassy-sync/src/pipe.rs | |||
| @@ -25,7 +25,7 @@ where | |||
| 25 | M: RawMutex, | 25 | M: RawMutex, |
| 26 | { | 26 | { |
| 27 | fn clone(&self) -> Self { | 27 | fn clone(&self) -> Self { |
| 28 | Writer { pipe: self.pipe } | 28 | *self |
| 29 | } | 29 | } |
| 30 | } | 30 | } |
| 31 | 31 | ||
diff --git a/embassy-sync/src/priority_channel.rs b/embassy-sync/src/priority_channel.rs index 4b9bd0515..8572d3608 100644 --- a/embassy-sync/src/priority_channel.rs +++ b/embassy-sync/src/priority_channel.rs | |||
| @@ -33,7 +33,7 @@ where | |||
| 33 | M: RawMutex, | 33 | M: RawMutex, |
| 34 | { | 34 | { |
| 35 | fn clone(&self) -> Self { | 35 | fn clone(&self) -> Self { |
| 36 | Sender { channel: self.channel } | 36 | *self |
| 37 | } | 37 | } |
| 38 | } | 38 | } |
| 39 | 39 | ||
| @@ -101,7 +101,7 @@ where | |||
| 101 | M: RawMutex, | 101 | M: RawMutex, |
| 102 | { | 102 | { |
| 103 | fn clone(&self) -> Self { | 103 | fn clone(&self) -> Self { |
| 104 | Receiver { channel: self.channel } | 104 | *self |
| 105 | } | 105 | } |
| 106 | } | 106 | } |
| 107 | 107 | ||
diff --git a/embassy-sync/src/waitqueue/multi_waker.rs b/embassy-sync/src/waitqueue/multi_waker.rs index 824d192da..0e520bf40 100644 --- a/embassy-sync/src/waitqueue/multi_waker.rs +++ b/embassy-sync/src/waitqueue/multi_waker.rs | |||
| @@ -14,7 +14,7 @@ impl<const N: usize> MultiWakerRegistration<N> { | |||
| 14 | } | 14 | } |
| 15 | 15 | ||
| 16 | /// Register a waker. If the buffer is full the function returns it in the error | 16 | /// Register a waker. If the buffer is full the function returns it in the error |
| 17 | pub fn register<'a>(&mut self, w: &'a Waker) { | 17 | pub fn register(&mut self, w: &Waker) { |
| 18 | // If we already have some waker that wakes the same task as `w`, do nothing. | 18 | // If we already have some waker that wakes the same task as `w`, do nothing. |
| 19 | // This avoids cloning wakers, and avoids unnecessary mass-wakes. | 19 | // This avoids cloning wakers, and avoids unnecessary mass-wakes. |
| 20 | for w2 in &self.wakers { | 20 | for w2 in &self.wakers { |
