mirror of
https://github.com/ilya-zlobintsev/LACT.git
synced 2025-02-25 18:55:26 -06:00
chore: skip serializing empty values in the config
This commit is contained in:
parent
4a092b7109
commit
fa0eb3083c
@ -26,6 +26,7 @@ pub struct Config {
|
|||||||
pub daemon: Daemon,
|
pub daemon: Daemon,
|
||||||
#[serde(default = "default_apply_settings_timer")]
|
#[serde(default = "default_apply_settings_timer")]
|
||||||
pub apply_settings_timer: u64,
|
pub apply_settings_timer: u64,
|
||||||
|
#[serde(default, skip_serializing_if = "HashMap::is_empty")]
|
||||||
pub gpus: HashMap<String, Gpu>,
|
pub gpus: HashMap<String, Gpu>,
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -39,6 +40,7 @@ impl Default for Config {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[skip_serializing_none]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq, Eq)]
|
||||||
pub struct Daemon {
|
pub struct Daemon {
|
||||||
pub log_level: String,
|
pub log_level: String,
|
||||||
@ -113,6 +115,7 @@ impl Gpu {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#[skip_serializing_none]
|
||||||
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
#[derive(Debug, Clone, Serialize, Deserialize, PartialEq)]
|
||||||
pub struct FanControlSettings {
|
pub struct FanControlSettings {
|
||||||
#[serde(default)]
|
#[serde(default)]
|
||||||
|
Loading…
Reference in New Issue
Block a user