diff --git a/firmware/src/lcd.rs b/firmware/src/lcd.rs index cb599d4..a07107d 100644 --- a/firmware/src/lcd.rs +++ b/firmware/src/lcd.rs @@ -35,11 +35,7 @@ impl Lcd { delay.delay_us(5_u8); self.cd.set_high(); - if invert { - data.for_each(|d| block!(self.spi.send(!*d)).unwrap()); - } else { - data.for_each(|d| block!(self.spi.send(*d)).unwrap()); - } + data.for_each(|d| block!(self.spi.send(if invert { !*d } else { *d })).unwrap()); delay.delay_us(5_u8); self.cd.set_low();