cosmic-config-derive: automatically generate setters

This commit is contained in:
Jeremy Soller 2024-01-12 09:39:35 -07:00
parent 2c6db80c64
commit 63802dfcf9
2 changed files with 25 additions and 5 deletions

View file

@ -35,11 +35,6 @@ impl ThemeMode {
1
}
/// Set auto-switch from light to dark mode
pub fn set_auto_switch(config: &Config, value: bool) -> Result<(), cosmic_config::Error> {
config.set("auto_switch", value)
}
/// Get the config for the theme mode
pub fn config() -> Result<Config, cosmic_config::Error> {
Config::new(THEME_MODE_ID, Self::version())