diff --git a/src/app/core.rs b/src/app/core.rs index f090cdc4000..42c4429fe31 100644 --- a/src/app/core.rs +++ b/src/app/core.rs @@ -117,7 +117,7 @@ impl Default for Core { system_theme_mode: ThemeMode::config() .map(|c| { ThemeMode::get_entry(&c).unwrap_or_else(|(errors, mode)| { - for why in errors { + for why in errors.into_iter().filter(cosmic_config::Error::is_err) { tracing::error!(?why, "ThemeMode config entry error"); } mode diff --git a/src/app/cosmic.rs b/src/app/cosmic.rs index 30a116f6787..fd876cfd3a4 100644 --- a/src/app/cosmic.rs +++ b/src/app/cosmic.rs @@ -192,7 +192,11 @@ where .core() .watch_config::(crate::config::ID) .map(|update| { - for why in update.errors { + for why in update + .errors + .into_iter() + .filter(cosmic_config::Error::is_err) + { tracing::error!(?why, "cosmic toolkit config update error"); } @@ -216,7 +220,11 @@ where }, ) .map(|update| { - for why in update.errors { + for why in update + .errors + .into_iter() + .filter(cosmic_config::Error::is_err) + { tracing::error!(?why, "cosmic theme config update error"); } Message::SystemThemeChange( @@ -229,8 +237,12 @@ where .core() .watch_config::(cosmic_theme::THEME_MODE_ID) .map(|update| { - for e in update.errors { - tracing::error!("{e}"); + for error in update + .errors + .into_iter() + .filter(cosmic_config::Error::is_err) + { + tracing::error!(?error, "error reading system theme mode update"); } Message::SystemThemeModeChange(update.keys, update.config) }) diff --git a/src/config/mod.rs b/src/config/mod.rs index 035c2f68694..4f1a5a16c41 100644 --- a/src/config/mod.rs +++ b/src/config/mod.rs @@ -24,7 +24,7 @@ pub static COSMIC_TK: LazyLock> = LazyLock::new(|| { CosmicTk::config() .map(|c| { CosmicTk::get_entry(&c).unwrap_or_else(|(errors, mode)| { - for why in errors { + for why in errors.into_iter().filter(cosmic_config::Error::is_err) { tracing::error!(?why, "CosmicTk config entry error"); } mode