Run cargo fmt

This commit is contained in:
Paul van Tilburg 2019-03-17 13:36:52 +01:00
parent 7b9ee69d1a
commit 88793567c2
2 changed files with 5 additions and 5 deletions

View File

@ -22,7 +22,7 @@ impl Direction {
pub enum Mode {
Off,
Cycle,
Accelerometer
Accelerometer,
}
pub struct LedRing {

View File

@ -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();
}
})
}