mirror of
https://github.com/RGBCube/superfreq
synced 2025-07-27 17:07:44 +00:00
cpu: cleanup get_platform_profiles
This commit is contained in:
parent
25db531651
commit
e6015cf0f1
1 changed files with 1 additions and 5 deletions
|
@ -264,13 +264,9 @@ pub fn get_platform_profiles() -> Result<Vec<String>> {
|
|||
)));
|
||||
}
|
||||
|
||||
let buf = fs::read(path)
|
||||
let content = fs::read_to_string(path)
|
||||
.map_err(|_| ControlError::PermissionDenied(format!("Cannot read contents of {path}.")))?;
|
||||
|
||||
let content = str::from_utf8(&buf).map_err(|_| {
|
||||
ControlError::NotSupported(format!("No platform profile choices found at {path}."))
|
||||
})?;
|
||||
|
||||
Ok(content
|
||||
.split_whitespace()
|
||||
.map(ToString::to_string)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue