1
Fork 0
mirror of https://github.com/RGBCube/superfreq synced 2025-07-27 17:07:44 +00:00

config: improve EPP value validation

This commit is contained in:
NotAShelf 2025-05-16 01:33:38 +03:00
parent 2256cf25f9
commit 18141d22e1
No known key found for this signature in database
GPG key ID: 29D95B64378DB4BF

View file

@ -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<()> {
// Validate the EPP value against available options
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!(
"Invalid EPP value: '{}'. Available values: {}",
epp,