nrf: Drop needless let

This commit is contained in:
Priit Laes 2024-02-17 13:08:53 +02:00
parent bb2fb59a87
commit a8710e943d
2 changed files with 4 additions and 5 deletions
embassy-nrf/src

View file

@ -444,7 +444,7 @@ impl<'d, 's, T: Instance> Sequencer<'d, 's, T> {
return Err(Error::SequenceTimesAtLeastOne);
}
let _ = self.stop();
self.stop();
let r = T::regs();
@ -507,7 +507,7 @@ impl<'d, 's, T: Instance> Sequencer<'d, 's, T> {
impl<'d, 's, T: Instance> Drop for Sequencer<'d, 's, T> {
fn drop(&mut self) {
let _ = self.stop();
self.stop();
}
}

View file

@ -172,7 +172,7 @@ impl<'d, T: Instance> Qdec<'d, T> {
t.intenset.write(|w| w.reportrdy().set());
unsafe { t.tasks_readclracc.write(|w| w.bits(1)) };
let value = poll_fn(|cx| {
poll_fn(|cx| {
T::state().waker.register(cx.waker());
if t.events_reportrdy.read().bits() == 0 {
return Poll::Pending;
@ -182,8 +182,7 @@ impl<'d, T: Instance> Qdec<'d, T> {
Poll::Ready(acc as i16)
}
})
.await;
value
.await
}
}