fix all available options not being displayed in led-mode help

This commit is contained in:
Martin Piffault
2022-06-04 14:47:40 +02:00
parent b6934bbf63
commit 9f18c88153
2 changed files with 11 additions and 11 deletions
+1 -1
View File
@@ -355,7 +355,7 @@ fn handle_led_mode(
let commands: Vec<String> = cmdlist.lines().map(|s| s.to_string()).collect();
for command in commands.iter().filter(|command| {
for mode in &supported.stock_led_modes {
if command.contains(&<&str>::from(mode).to_lowercase()) {
if command.trim().starts_with(&<&str>::from(mode).to_lowercase()) {
return true;
}
}