mirror of
https://github.com/RGBCube/superfreq
synced 2025-07-28 09:27:44 +00:00
config: improve EPP value validation
This commit is contained in:
parent
2256cf25f9
commit
18141d22e1
1 changed files with 1 additions and 1 deletions
|
@ -202,7 +202,7 @@ fn try_set_per_core_boost(value: &str) -> Result<bool> {
|
||||||
pub fn set_epp(epp: &str, core_id: Option<u32>) -> Result<()> {
|
pub fn set_epp(epp: &str, core_id: Option<u32>) -> Result<()> {
|
||||||
// Validate the EPP value against available options
|
// Validate the EPP value against available options
|
||||||
let available_epp = get_available_epp_values()?;
|
let available_epp = get_available_epp_values()?;
|
||||||
if !available_epp.contains(&epp.to_string()) {
|
if !available_epp.iter().any(|v| v.eq_ignore_ascii_case(epp)) {
|
||||||
return Err(ControlError::InvalidValueError(format!(
|
return Err(ControlError::InvalidValueError(format!(
|
||||||
"Invalid EPP value: '{}'. Available values: {}",
|
"Invalid EPP value: '{}'. Available values: {}",
|
||||||
epp,
|
epp,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue