From 42ac0f1af2ad1a8f7b905aeed57ee77ccfd595ed Mon Sep 17 00:00:00 2001 From: Albin Hedman Date: Sun, 15 Dec 2024 17:24:23 +0100 Subject: [PATCH] fmt --- src/gpio.rs | 2 -- src/i2c.rs | 6 ++---- 2 files changed, 2 insertions(+), 6 deletions(-) diff --git a/src/gpio.rs b/src/gpio.rs index 7794e533..8887b90d 100644 --- a/src/gpio.rs +++ b/src/gpio.rs @@ -780,10 +780,8 @@ macro_rules! gpio_trait { fn foo(x: crate::pac::gpioa::RegisterBlock, n: u8) { x.bsrr().write(|w| w.br(n).set_bit()); x.odr().read().odr(n).is_low(); - } - /// Implement `private::{Moder, Ospeedr, Otyper, Pupdr}` traits for each opaque register structs macro_rules! r_trait { ( diff --git a/src/i2c.rs b/src/i2c.rs index 9fc4b56e..32a4997c 100644 --- a/src/i2c.rs +++ b/src/i2c.rs @@ -378,8 +378,7 @@ where self.i2c.cr2().modify(|_, w| { if i == 0 { w.add10().bit7(); - w.sadd() - .set(u16::from(crate::unwrap!(addr.checked_shl(1)))); + w.sadd().set(u16::from(crate::unwrap!(addr.checked_shl(1)))); w.rd_wrn().write(); w.start().start(); } @@ -420,8 +419,7 @@ where self.i2c.cr2().modify(|_, w| { if i == 0 { w.add10().bit7(); - w.sadd() - .set(u16::from(crate::unwrap!(addr.checked_shl(1)))); + w.sadd().set(u16::from(crate::unwrap!(addr.checked_shl(1)))); w.rd_wrn().read(); w.start().start(); }