From 1c1daaa6d2d59b77f1af91211d822d1b2cde773b Mon Sep 17 00:00:00 2001 From: Denis Benato Date: Sun, 12 Oct 2025 19:47:26 +0200 Subject: [PATCH] chore: reimplement default for FanCurveCPU --- rog-profiles/src/lib.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/rog-profiles/src/lib.rs b/rog-profiles/src/lib.rs index 1000923c..51e91d88 100644 --- a/rog-profiles/src/lib.rs +++ b/rog-profiles/src/lib.rs @@ -37,8 +37,9 @@ pub fn find_fan_curve_node() -> Result { derive(Type, Value, OwnedValue), zvariant(signature = "s") )] -#[derive(Deserialize, Serialize, Debug, Hash, PartialEq, Eq, Clone, Copy)] +#[derive(Default, Deserialize, Serialize, Debug, Hash, PartialEq, Eq, Clone, Copy)] pub enum FanCurvePU { + #[default] CPU = 0, GPU = 1, MID = 2, @@ -100,12 +101,6 @@ impl std::str::FromStr for FanCurvePU { } } -impl Default for FanCurvePU { - fn default() -> Self { - Self::CPU - } -} - /// Main purpose of `FanCurves` is to enable restoring state on system boot #[cfg_attr(feature = "dbus", derive(Type))] #[derive(Deserialize, Serialize, Debug, Default)]