From 4a6b4330d4954a78dd1a02848e631ff49e76ab43 Mon Sep 17 00:00:00 2001 From: CorvusPrudens Date: Thu, 7 Dec 2023 10:20:11 -0700 Subject: [PATCH] chore(style): rustfmt --- examples/usb_midi.rs | 2 +- src/flash.rs | 2 +- src/hid.rs | 2 +- src/mpu.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/examples/usb_midi.rs b/examples/usb_midi.rs index 7fd65f6..f3a1f58 100644 --- a/examples/usb_midi.rs +++ b/examples/usb_midi.rs @@ -195,7 +195,7 @@ mod app { let led = &mut local.seed_led; if !usb_dev.poll(&mut [midi]) { - return + return; } let mut buffer = [0; 64]; diff --git a/src/flash.rs b/src/flash.rs index ace5517..4c05cf3 100644 --- a/src/flash.rs +++ b/src/flash.rs @@ -83,7 +83,7 @@ impl Flash { fn wait_write(&mut self) -> FlashResult<()> { loop { if self.write_complete()? { - return Ok(()) + return Ok(()); } } } diff --git a/src/hid.rs b/src/hid.rs index b7cff1c..6be4e6d 100644 --- a/src/hid.rs +++ b/src/hid.rs @@ -151,7 +151,7 @@ where /// If the switch is being held pub fn is_held(&self) -> bool { if let Some(held_threshold) = self.held_threshold { - return self.falling && self.held_counter >= held_threshold + return self.falling && self.held_counter >= held_threshold; } false } diff --git a/src/mpu.rs b/src/mpu.rs index 66ee759..0ae6135 100644 --- a/src/mpu.rs +++ b/src/mpu.rs @@ -50,7 +50,7 @@ pub fn enable(mpu: &mut cortex_m::peripheral::MPU, scb: &mut cortex_m::periphera fn log2minus1(sz: u32) -> u32 { for x in 5..=31 { if sz == (1 << x) { - return x - 1 + return x - 1; } } panic!("Unknown memory region size!");