mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-22 06:42:32 +00:00
Merge pull request #2980 from sourcebox/sync-additions
embassy-sync: fixed some clippy warnings
This commit is contained in:
commit
c7c5723f8b
@ -42,7 +42,7 @@ where
|
||||
M: RawMutex,
|
||||
{
|
||||
fn clone(&self) -> Self {
|
||||
Sender { channel: self.channel }
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
@ -81,7 +81,7 @@ pub struct DynamicSender<'ch, T> {
|
||||
|
||||
impl<'ch, T> Clone for DynamicSender<'ch, T> {
|
||||
fn clone(&self) -> Self {
|
||||
DynamicSender { channel: self.channel }
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
@ -135,7 +135,7 @@ where
|
||||
M: RawMutex,
|
||||
{
|
||||
fn clone(&self) -> Self {
|
||||
Receiver { channel: self.channel }
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
@ -188,7 +188,7 @@ pub struct DynamicReceiver<'ch, T> {
|
||||
|
||||
impl<'ch, T> Clone for DynamicReceiver<'ch, T> {
|
||||
fn clone(&self) -> Self {
|
||||
DynamicReceiver { channel: self.channel }
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -25,7 +25,7 @@ where
|
||||
M: RawMutex,
|
||||
{
|
||||
fn clone(&self) -> Self {
|
||||
Writer { pipe: self.pipe }
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ where
|
||||
M: RawMutex,
|
||||
{
|
||||
fn clone(&self) -> Self {
|
||||
Sender { channel: self.channel }
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
@ -101,7 +101,7 @@ where
|
||||
M: RawMutex,
|
||||
{
|
||||
fn clone(&self) -> Self {
|
||||
Receiver { channel: self.channel }
|
||||
*self
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -14,7 +14,7 @@ impl<const N: usize> MultiWakerRegistration<N> {
|
||||
}
|
||||
|
||||
/// Register a waker. If the buffer is full the function returns it in the error
|
||||
pub fn register<'a>(&mut self, w: &'a Waker) {
|
||||
pub fn register(&mut self, w: &Waker) {
|
||||
// If we already have some waker that wakes the same task as `w`, do nothing.
|
||||
// This avoids cloning wakers, and avoids unnecessary mass-wakes.
|
||||
for w2 in &self.wakers {
|
||||
|
Loading…
Reference in New Issue
Block a user