format: run rustfmt

This commit is contained in:
grig-iv 2024-02-13 00:40:15 +03:00
parent a92787564b
commit bd9ccd30e1

View file

@ -1,11 +1,15 @@
use serde::{Deserialize, Deserializer};
use super::Style;
use crate::{theme::{Color, StyleShadow}, Pattern, preset::Preset};
use crate::{
preset::Preset,
theme::{Color, StyleShadow},
Pattern,
};
pub struct Icon {
pub name: Pattern,
pub text: String,
pub name: Pattern,
pub text: String,
pub style: Style,
}
@ -18,9 +22,9 @@ impl Icon {
struct IconOuter {
rules: Vec<IconRule>,
#[serde(default)]
prepend_rules: Vec<IconRule>,
prepend_rules: Vec<IconRule>,
#[serde(default)]
append_rules: Vec<IconRule>,
append_rules: Vec<IconRule>,
}
#[derive(Deserialize)]
struct IconRule {
@ -40,8 +44,8 @@ impl Icon {
.rules
.into_iter()
.map(|r| Icon {
name: r.name,
text: r.text,
name: r.name,
text: r.text,
style: StyleShadow { fg: r.fg, ..Default::default() }.into(),
})
.collect(),