From 671f35058caee5a503ef51dcd6633dbb43abc08f Mon Sep 17 00:00:00 2001 From: Greg Burri Date: Thu, 21 Sep 2023 11:11:00 +0200 Subject: [PATCH] cargo fmt --- src/asus_aura_usb.rs | 25 ++++++++++++------------- src/corsair_lighting_pro.rs | 2 +- 2 files changed, 13 insertions(+), 14 deletions(-) diff --git a/src/asus_aura_usb.rs b/src/asus_aura_usb.rs index 01590c0..e639d38 100644 --- a/src/asus_aura_usb.rs +++ b/src/asus_aura_usb.rs @@ -28,19 +28,18 @@ pub struct Device { impl Device { pub fn new(api: &hidapi::HidApi, motherboard: Motherboard) -> Self { - let device = - Device { - device: api - .open( - VID, - match motherboard { - Motherboard::Asus650e => PID_650_E, - Motherboard::AsusCrosshairVIIIHero => PID_CROSSHAIR, - }, - ) - .unwrap(), - motherboard, - }; + let device = Device { + device: api + .open( + VID, + match motherboard { + Motherboard::Asus650e => PID_650_E, + Motherboard::AsusCrosshairVIIIHero => PID_CROSSHAIR, + }, + ) + .unwrap(), + motherboard, + }; device.set_fixed_mode(); device diff --git a/src/corsair_lighting_pro.rs b/src/corsair_lighting_pro.rs index 7ccb373..25bee13 100644 --- a/src/corsair_lighting_pro.rs +++ b/src/corsair_lighting_pro.rs @@ -149,7 +149,7 @@ impl Device { buffer[0x04] = NB_LEDS; // Number of color; buffer[0x05] = color_channel; - let color_component = match color_channel { + let color_component = match color_channel { 0 => color.red, 1 => color.green, _ => color.blue, -- 2.45.1