cargo fmt
authorGreg Burri <greg.burri@gmail.com>
Thu, 21 Sep 2023 09:11:00 +0000 (11:11 +0200)
committerGreg Burri <greg.burri@gmail.com>
Thu, 21 Sep 2023 09:11:00 +0000 (11:11 +0200)
src/asus_aura_usb.rs
src/corsair_lighting_pro.rs

index 01590c0..e639d38 100644 (file)
@@ -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
index 7ccb373..25bee13 100644 (file)
@@ -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,