From 371cd1f5425f8b67e8774f3545bd91ff6ecb9450 Mon Sep 17 00:00:00 2001 From: Adil Hanney Date: Tue, 10 Feb 2026 21:46:08 +0000 Subject: [PATCH] tweak: return format! string directly --- cosmic-theme/src/output/qt_output.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/cosmic-theme/src/output/qt_output.rs b/cosmic-theme/src/output/qt_output.rs index a2198d6f..b346b386 100644 --- a/cosmic-theme/src/output/qt_output.rs +++ b/cosmic-theme/src/output/qt_output.rs @@ -17,8 +17,6 @@ impl Theme { /// Some high-level documentation for this file can be found at: /// https://web.archive.org/web/20250402234329/https://docs.kde.org/stable5/en/plasma-workspace/kcontrol/colors/ pub fn as_qt(&self) -> String { - let mut output = "# GENERATED BY COSMIC\n".to_string(); - // Usually, disabled elements will have strongly reduced contrast and are often notably darker or lighter let disabled_color_effects = IniColorEffects { color: self.button.disabled, @@ -120,8 +118,9 @@ impl Theme { let light_or_dark = if self.is_dark { "Dark" } else { "Light" }; - output.push_str(&format!( - r#" + format!( + r#"# GENERATED BY COSMIC + [ColorEffects:Disabled] {} @@ -176,9 +175,7 @@ contrast=4 format_ini_colors(&view_colors, bg), format_ini_colors(&window_colors, bg), format_ini_wm_colors(&view_colors, self.is_dark), - )); - - output + ) } /// Write the color scheme to the appropriate directory.