From 88793567c2acbca18eba2c33f8b956decbd02424 Mon Sep 17 00:00:00 2001 From: Paul van Tilburg Date: Sun, 17 Mar 2019 13:36:52 +0100 Subject: [PATCH] Run cargo fmt --- src/led_ring.rs | 2 +- src/main.rs | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/led_ring.rs b/src/led_ring.rs index 5c26ecb..a587032 100644 --- a/src/led_ring.rs +++ b/src/led_ring.rs @@ -22,7 +22,7 @@ impl Direction { pub enum Mode { Off, Cycle, - Accelerometer + Accelerometer, } pub struct LedRing { diff --git a/src/main.rs b/src/main.rs index e823b77..7a3a64c 100644 --- a/src/main.rs +++ b/src/main.rs @@ -135,16 +135,16 @@ const APP: () = { if acc_x == 0 && acc_y == 0 { resources .serial_tx - .lock(|serial_tx| - writeln!(serial_tx, "level\r").unwrap() - ); + .lock(|serial_tx| writeln!(serial_tx, "level\r").unwrap()); } resources.led_ring.lock(|led_ring| { if led_ring.is_mode_accel() { let directions = [acc_y < 0, acc_x < 0, acc_y > 0, acc_x > 0]; led_ring.set_directions(directions); - schedule.accel_leds(scheduled + LedRing::PERIOD.cycles()).unwrap(); + schedule + .accel_leds(scheduled + LedRing::PERIOD.cycles()) + .unwrap(); } }) }