This commit is contained in:
merelymyself 2022-09-21 13:18:16 +08:00 committed by Abin Simon
parent bc8745528d
commit 54a07e63ee
2 changed files with 10 additions and 10 deletions

View file

@ -105,7 +105,7 @@ pub struct Theme {
pub file_type: FileType, pub file_type: FileType,
} }
#[derive(Debug, Deserialize, PartialEq)] #[derive(Debug, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")] #[serde(rename_all = "kebab-case")]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
#[serde(default)] #[serde(default)]
@ -128,7 +128,7 @@ pub struct Permission {
pub context: Color, pub context: Color,
} }
#[derive(Debug, Deserialize, PartialEq)] #[derive(Debug, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")] #[serde(rename_all = "kebab-case")]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
#[serde(default)] #[serde(default)]
@ -148,7 +148,7 @@ pub struct FileType {
pub special: Color, pub special: Color,
} }
#[derive(Debug, Deserialize, PartialEq)] #[derive(Debug, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")] #[serde(rename_all = "kebab-case")]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
#[serde(default)] #[serde(default)]
@ -163,7 +163,7 @@ pub struct File {
pub no_exec_no_uid: Color, pub no_exec_no_uid: Color,
} }
#[derive(Debug, Deserialize, PartialEq)] #[derive(Debug, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")] #[serde(rename_all = "kebab-case")]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
#[serde(default)] #[serde(default)]
@ -174,7 +174,7 @@ pub struct Dir {
pub no_uid: Color, pub no_uid: Color,
} }
#[derive(Debug, Deserialize, PartialEq)] #[derive(Debug, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")] #[serde(rename_all = "kebab-case")]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
#[serde(default)] #[serde(default)]
@ -187,7 +187,7 @@ pub struct Symlink {
pub missing_target: Color, pub missing_target: Color,
} }
#[derive(Debug, Deserialize, PartialEq)] #[derive(Debug, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")] #[serde(rename_all = "kebab-case")]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
#[serde(default)] #[serde(default)]
@ -200,7 +200,7 @@ pub struct Date {
pub older: Color, pub older: Color,
} }
#[derive(Debug, Deserialize, PartialEq)] #[derive(Debug, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")] #[serde(rename_all = "kebab-case")]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
#[serde(default)] #[serde(default)]
@ -215,7 +215,7 @@ pub struct Size {
pub large: Color, pub large: Color,
} }
#[derive(Debug, Deserialize, PartialEq)] #[derive(Debug, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")] #[serde(rename_all = "kebab-case")]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
#[serde(default)] #[serde(default)]
@ -226,7 +226,7 @@ pub struct INode {
pub invalid: Color, pub invalid: Color,
} }
#[derive(Debug, Deserialize, PartialEq)] #[derive(Debug, Deserialize, PartialEq, Eq)]
#[serde(rename_all = "kebab-case")] #[serde(rename_all = "kebab-case")]
#[serde(deny_unknown_fields)] #[serde(deny_unknown_fields)]
#[serde(default)] #[serde(default)]

View file

@ -93,7 +93,7 @@ impl Name {
.chars() .chars()
.all(|c| c >= 0x20 as char && c != 0x7f as char) .all(|c| c >= 0x20 as char && c != 0x7f as char)
{ {
string.to_string() string
} else { } else {
let mut chars = String::new(); let mut chars = String::new();
for c in string.chars() { for c in string.chars() {