Use hashset in aura power config

This commit is contained in:
Luke D. Jones
2022-07-15 09:30:10 +12:00
parent 95598f2a76
commit f39fd6dfbb
5 changed files with 16 additions and 20 deletions

View File

@@ -298,7 +298,8 @@ impl CtrlKbdLed {
/// Set combination state for boot animation/sleep animation/all leds/keys leds/side leds LED active
pub(super) fn set_power_states(&self, config: &AuraConfig) -> Result<(), RogError> {
let bytes = AuraControl::to_bytes(&config.enabled);
let set: Vec<AuraControl> = config.enabled.iter().map(|v| *v).collect();
let bytes = AuraControl::to_bytes(&set);
// Quite ugly, must be a more idiomatic way to do
let message = [