This commit is contained in:
sxyazi 2024-02-29 11:30:25 +08:00
parent d6744b4cb9
commit cb5139c43a
No known key found for this signature in database
2 changed files with 2 additions and 2 deletions

View file

@ -20,7 +20,7 @@ impl Preset {
let Ok(user) = std::fs::read_to_string(p.join("theme.toml")) else { let Ok(user) = std::fs::read_to_string(p.join("theme.toml")) else {
return include_str!("../preset/theme.toml").to_owned(); return include_str!("../preset/theme.toml").to_owned();
}; };
let Some(use_) = Flavor::parse_name(&user) else { let Some(use_) = Flavor::parse_use(&user) else {
return Self::merge_str(&user, include_str!("../preset/theme.toml")); return Self::merge_str(&user, include_str!("../preset/theme.toml"));
}; };

View file

@ -7,7 +7,7 @@ pub struct Flavor {
} }
impl Flavor { impl Flavor {
pub fn parse_name(s: &str) -> Option<String> { pub fn parse_use(s: &str) -> Option<String> {
#[derive(Deserialize)] #[derive(Deserialize)]
struct Outer { struct Outer {
flavor: Inner, flavor: Inner,