mirror of
https://gitlab.steamos.cloud/holo/steamos-manager.git
synced 2025-07-12 17:32:21 -04:00
Run cargo fmt
This commit is contained in:
parent
5e8b4160d2
commit
336fe1d3be
1 changed files with 6 additions and 3 deletions
|
@ -178,7 +178,7 @@ async fn read_cpu_governor_sysfs_available_contents() -> Result<String> {
|
||||||
let base = path(CPU_PREFIX);
|
let base = path(CPU_PREFIX);
|
||||||
Ok(fs::read_to_string(
|
Ok(fs::read_to_string(
|
||||||
base.join(CPU0_NAME)
|
base.join(CPU0_NAME)
|
||||||
.join(CPU_SCALING_AVAILABLE_GOVERNORS_SUFFIX)
|
.join(CPU_SCALING_AVAILABLE_GOVERNORS_SUFFIX),
|
||||||
)
|
)
|
||||||
.await?)
|
.await?)
|
||||||
}
|
}
|
||||||
|
@ -324,8 +324,11 @@ pub(crate) async fn get_cpu_scaling_governor() -> Result<CPUScalingGovernor> {
|
||||||
let contents = read_cpu_governor_sysfs_contents().await?;
|
let contents = read_cpu_governor_sysfs_contents().await?;
|
||||||
|
|
||||||
let contents = contents.trim();
|
let contents = contents.trim();
|
||||||
CPUScalingGovernor::from_str(contents)
|
CPUScalingGovernor::from_str(contents).map_err(|message| {
|
||||||
.map_err(|message| anyhow!("Error converting CPU scaling governor sysfs file contents to enumeration: {message}"))
|
anyhow!(
|
||||||
|
"Error converting CPU scaling governor sysfs file contents to enumeration: {message}"
|
||||||
|
)
|
||||||
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub(crate) async fn set_cpu_scaling_governor(governor: CPUScalingGovernor) -> Result<()> {
|
pub(crate) async fn set_cpu_scaling_governor(governor: CPUScalingGovernor) -> Result<()> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue