From d236f3dbf9b53c5e646020946d8da1458eb591a1 Mon Sep 17 00:00:00 2001 From: Peter Gibson Date: Thu, 15 Jun 2023 18:35:58 +1000 Subject: [PATCH] actually fix formatting --- embassy-stm32/src/usart/buffered.rs | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/embassy-stm32/src/usart/buffered.rs b/embassy-stm32/src/usart/buffered.rs index e04b3ea0..530760bd 100644 --- a/embassy-stm32/src/usart/buffered.rs +++ b/embassy-stm32/src/usart/buffered.rs @@ -24,8 +24,7 @@ impl interrupt::typelevel::Handler for Interrupt // Reading DR clears the rxne, error and idle interrupt flags on v1. let dr = if sr.ore() || sr.idle() || sr.rxne() { Some(rdr(r).read_volatile()) - } - else { + } else { None }; clear_interrupt_flags(r, sr); @@ -48,8 +47,7 @@ impl interrupt::typelevel::Handler for Interrupt if !buf.is_empty() { buf[0] = dr.unwrap(); rx_writer.push_done(1); - } - else { + } else { // FIXME: Should we disable any further RX interrupts when the buffer becomes full. }