From 622f4f6f32ffae4fd89a42d0197b5c20947c01df Mon Sep 17 00:00:00 2001 From: NotAShelf Date: Fri, 16 May 2025 03:06:59 +0300 Subject: [PATCH] engine: simplify error handling --- src/engine.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/engine.rs b/src/engine.rs index 7001871..791fa5a 100644 --- a/src/engine.rs +++ b/src/engine.rs @@ -23,14 +23,13 @@ where match apply_fn() { Ok(_) => Ok(()), Err(e) => { - if matches!(e, ControlError::NotSupported(_)) - || matches!(e, ControlError::InvalidValueError(_)) - { + if matches!(e, ControlError::NotSupported(_)) { warn!( "{feature_name} setting is not supported on this system. Skipping {feature_name} configuration." ); Ok(()) } else { + // Propagate all other errors, including InvalidValueError Err(EngineError::ControlError(e)) } }