From 07ca582760712fb831520f86a1e4fb5007ec0456 Mon Sep 17 00:00:00 2001 From: RGBCube Date: Thu, 22 May 2025 17:42:33 +0300 Subject: [PATCH] cpu: set_ep{p,b} actually sets the attributes now --- src/cpu.rs | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/src/cpu.rs b/src/cpu.rs index c41a0d0..d7ab01f 100644 --- a/src/cpu.rs +++ b/src/cpu.rs @@ -387,10 +387,14 @@ impl Cpu { ) .with_context(|| { format!("this probably means that {self} doesn't exist or doesn't support changing EPP") - }) + })?; + + self.epp = Some(epp.to_owned()); + + Ok(()) } - pub fn set_epb(&self, epb: &str) -> anyhow::Result<()> { + pub fn set_epb(&mut self, epb: &str) -> anyhow::Result<()> { let Self { number, available_epbs: ref epbs, @@ -410,7 +414,11 @@ impl Cpu { ) .with_context(|| { format!("this probably means that {self} doesn't exist or doesn't support changing EPB") - }) + })?; + + self.epb = Some(epb.to_owned()); + + Ok(()) } pub fn set_frequency_mhz_minimum(&mut self, frequency_mhz: u64) -> anyhow::Result<()> {