mirror of
https://github.com/embassy-rs/embassy.git
synced 2024-11-26 08:42:32 +00:00
embassy/channel: remove unused receiver_consumed
This commit is contained in:
parent
b78f4695c4
commit
e1f9dd1170
@ -39,7 +39,6 @@
|
||||
|
||||
use core::cell::UnsafeCell;
|
||||
use core::fmt;
|
||||
use core::marker::PhantomData;
|
||||
use core::pin::Pin;
|
||||
use core::task::Context;
|
||||
use core::task::Poll;
|
||||
@ -75,7 +74,6 @@ where
|
||||
M: Mutex<Data = ()>,
|
||||
{
|
||||
channel_cell: &'ch UnsafeCell<ChannelCell<M, T, N>>,
|
||||
_receiver_consumed: &'ch mut PhantomData<()>,
|
||||
}
|
||||
|
||||
// Safe to pass the receiver around
|
||||
@ -123,7 +121,6 @@ where
|
||||
};
|
||||
let receiver = Receiver {
|
||||
channel_cell: &channel.channel_cell,
|
||||
_receiver_consumed: &mut channel.receiver_consumed,
|
||||
};
|
||||
Channel::lock(&channel.channel_cell, |c| {
|
||||
c.register_receiver();
|
||||
@ -587,7 +584,6 @@ where
|
||||
M: Mutex<Data = ()>,
|
||||
{
|
||||
channel_cell: UnsafeCell<ChannelCell<M, T, N>>,
|
||||
receiver_consumed: PhantomData<()>,
|
||||
}
|
||||
|
||||
struct ChannelCell<M, T, const N: usize>
|
||||
@ -625,7 +621,6 @@ where
|
||||
let channel_cell = ChannelCell { mutex, state };
|
||||
Channel {
|
||||
channel_cell: UnsafeCell::new(channel_cell),
|
||||
receiver_consumed: PhantomData,
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user