aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorBrian Cully <bjc@kublai.com>2022-10-27 20:08:42 -0400
committerBrian Cully <bjc@kublai.com>2022-10-27 20:08:42 -0400
commit1316d1fe605d0b67571187dc23ea099dd9612d6c (patch)
treeeb94dd4d3fe8fcfe8672d5e35a1549576cb1fc50 /src
parent0b5803f641d2ab7d42ac498ecccae7d3b3cbc298 (diff)
downloadluchie-1316d1fe605d0b67571187dc23ea099dd9612d6c.tar.gz
luchie-1316d1fe605d0b67571187dc23ea099dd9612d6c.zip
led: rustfmt
Diffstat (limited to 'src')
-rw-r--r--src/led.rs9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/led.rs b/src/led.rs
index ed2524d..ba32fe0 100644
--- a/src/led.rs
+++ b/src/led.rs
@@ -1,6 +1,4 @@
-use stm32f1xx_hal::{
- gpio::{Cr, CRL, Floating, Input, Output, PushPull, gpiob::PB2},
-};
+use stm32f1xx_hal::gpio::{gpiob::PB2, Cr, Floating, Input, Output, PushPull, CRL};
enum State {
Low,
@@ -19,7 +17,10 @@ impl LED {
pub fn new(pin: LEDPin<Input<Floating>>, cr: &mut Cr<CRL, 'B'>) -> Self {
let mut p = pin.into_push_pull_output(cr);
p.set_low();
- Self { pin: p, state: State::Low }
+ Self {
+ pin: p,
+ state: State::Low,
+ }
}
pub fn is_on(&self) -> bool {