mirror of
https://github.com/redlib-org/redlib.git
synced 2025-04-27 09:16:09 +00:00
lint
This commit is contained in:
parent
5a04aa89e8
commit
05d1adda6a
2 changed files with 3 additions and 2 deletions
|
@ -85,7 +85,7 @@ async fn style() -> Result<Response<Body>, String> {
|
||||||
for file in ThemeAssets::iter() {
|
for file in ThemeAssets::iter() {
|
||||||
res.push('\n');
|
res.push('\n');
|
||||||
let theme: Vec<&str> = file.as_ref().split(".css").collect();
|
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 = ThemeAssets::get(file.as_ref()).unwrap();
|
||||||
let style = std::str::from_utf8(style.data.as_ref()).unwrap();
|
let style = std::str::from_utf8(style.data.as_ref()).unwrap();
|
||||||
let style_light = &style.replace(&theme, &(theme.clone() + "_light"));
|
let style_light = &style.replace(&theme, &(theme.clone() + "_light"));
|
||||||
|
|
|
@ -1528,7 +1528,8 @@ mod tests {
|
||||||
fn serialize_prefs() {
|
fn serialize_prefs() {
|
||||||
let prefs = Preferences {
|
let prefs = Preferences {
|
||||||
available_themes: vec![],
|
available_themes: vec![],
|
||||||
theme: "laserwave".to_owned(),
|
theme_light: "laserwave".to_owned(),
|
||||||
|
theme_dark: "laserwave".to_owned(),
|
||||||
front_page: "default".to_owned(),
|
front_page: "default".to_owned(),
|
||||||
layout: "compact".to_owned(),
|
layout: "compact".to_owned(),
|
||||||
wide: "on".to_owned(),
|
wide: "on".to_owned(),
|
||||||
|
|
Loading…
Add table
Reference in a new issue