diff --git a/src/main.rs b/src/main.rs index 9b34e75..e6fe8cb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -85,7 +85,7 @@ async fn style() -> Result, String> { for file in ThemeAssets::iter() { res.push('\n'); let theme: Vec<&str> = file.as_ref().split(".css").collect(); - let theme = ".".to_owned() + &theme[0].to_owned(); + let theme = ".".to_owned() + theme[0]; let style = ThemeAssets::get(file.as_ref()).unwrap(); let style = std::str::from_utf8(style.data.as_ref()).unwrap(); let style_light = &style.replace(&theme, &(theme.clone() + "_light")); diff --git a/src/utils.rs b/src/utils.rs index e39d851..6fd78f0 100644 --- a/src/utils.rs +++ b/src/utils.rs @@ -1528,7 +1528,8 @@ mod tests { fn serialize_prefs() { let prefs = Preferences { available_themes: vec![], - theme: "laserwave".to_owned(), + theme_light: "laserwave".to_owned(), + theme_dark: "laserwave".to_owned(), front_page: "default".to_owned(), layout: "compact".to_owned(), wide: "on".to_owned(),