From: Greg Burri Date: Thu, 21 Sep 2023 09:11:00 +0000 (+0200) Subject: cargo fmt X-Git-Url: http://git.euphorik.ch/index.cgi?a=commitdiff_plain;h=671f35058caee5a503ef51dcd6633dbb43abc08f;p=temp2RGB.git cargo fmt --- 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,