mirror of
https://github.com/RGBCube/superfreq
synced 2025-07-27 17:07:44 +00:00
config: rename rule condition field
This commit is contained in:
parent
2c154cd589
commit
0e8b40227b
2 changed files with 2 additions and 2 deletions
|
@ -455,7 +455,7 @@ pub struct Rule {
|
||||||
pub priority: u8,
|
pub priority: u8,
|
||||||
|
|
||||||
#[serde(default, rename = "if", skip_serializing_if = "is_default")]
|
#[serde(default, rename = "if", skip_serializing_if = "is_default")]
|
||||||
pub if_: Expression,
|
pub condition: Expression,
|
||||||
|
|
||||||
#[serde(default, skip_serializing_if = "is_default")]
|
#[serde(default, skip_serializing_if = "is_default")]
|
||||||
pub cpu: CpuDelta,
|
pub cpu: CpuDelta,
|
||||||
|
|
|
@ -348,7 +348,7 @@ pub fn run(config: config::DaemonConfig) -> anyhow::Result<()> {
|
||||||
};
|
};
|
||||||
|
|
||||||
for rule in &config.rules {
|
for rule in &config.rules {
|
||||||
let Some(condition) = rule.if_.eval(&state)? else {
|
let Some(condition) = rule.condition.eval(&state)? else {
|
||||||
continue;
|
continue;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue