mirror of
https://github.com/sxyazi/yazi.git
synced 2026-07-25 08:41:05 +00:00
format: run rustfmt
This commit is contained in:
parent
a92787564b
commit
bd9ccd30e1
1 changed files with 11 additions and 7 deletions
|
|
@ -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(),
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue