Channel poll methods return Poll instead of bool

This commit is contained in:
Ruben De Smet
2023-08-11 11:15:17 +02:00
parent b658f10db9
commit f9d251cd5c
3 changed files with 26 additions and 23 deletions

View File

@ -28,7 +28,9 @@ impl<'d> embassy_net_driver::Driver for Driver<'d> {
type TxToken<'a> = TxToken<'d> where Self: 'a;
fn receive(&mut self, cx: &mut Context) -> Option<(Self::RxToken<'_>, Self::TxToken<'_>)> {
if self.runner.rx_channel.poll_ready_to_receive(cx) && self.runner.tx_buf_channel.poll_ready_to_receive(cx) {
if self.runner.rx_channel.poll_ready_to_receive(cx).is_ready()
&& self.runner.tx_buf_channel.poll_ready_to_receive(cx).is_ready()
{
Some((
RxToken {
rx: &self.runner.rx_channel,