From f794c532770a0f62470a66d56490599cb8a71ac0 Mon Sep 17 00:00:00 2001 From: Michael Aaron Murphy Date: Tue, 5 Mar 2024 16:06:10 +0100 Subject: [PATCH] refactor(cosmic-theme): Get `ThemeMode` version from cosmic config derive --- cosmic-theme/src/model/mode.rs | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cosmic-theme/src/model/mode.rs b/cosmic-theme/src/model/mode.rs index f910ba26..f57c653c 100644 --- a/cosmic-theme/src/model/mode.rs +++ b/cosmic-theme/src/model/mode.rs @@ -30,13 +30,12 @@ impl ThemeMode { config.get::("is_dark") } - /// version of the theme - pub fn version() -> u64 { - 1 + pub const fn version() -> u64 { + Self::VERSION } /// Get the config for the theme mode pub fn config() -> Result { - Config::new(THEME_MODE_ID, Self::version()) + Config::new(THEME_MODE_ID, Self::VERSION) } }