Many cleanup and fix

This commit is contained in:
Luke D. Jones
2024-04-17 11:52:27 +12:00
parent 3142353f98
commit 64e8cb65d0
15 changed files with 466 additions and 96 deletions

View File

@@ -91,6 +91,7 @@ impl LedSupportFile {
if !config.product_id.is_empty() {
info!("Checking product ID");
if config.product_id == product_id {
info!("Matched to {}", config.product_id);
return Some(config.clone());
} else {
continue;
@@ -192,6 +193,7 @@ mod tests {
// Ensure the data is sorted
let mut tmp_sort = tmp.clone();
tmp_sort.0.sort_by(|a, b| a.product_id.cmp(&b.product_id));
tmp_sort.0.sort_by(|a, b| a.device_name.cmp(&b.device_name));
if tmp != tmp_sort {
let sorted =

View File

@@ -276,7 +276,6 @@ impl From<OldAuraPower> for u32 {
#[cfg(test)]
mod test {
use crate::aura_detection::LedSupportData;
use crate::keyboard::{AuraPowerState, LaptopAuraPower};
use crate::{AuraDeviceType, PowerZones};