mirror of
https://github.com/orhun/systeroid
synced 2024-09-30 04:33:31 +00:00
fix(lint): apply clippy suggestions
This commit is contained in:
parent
48e5ad6cc6
commit
b47e91a0a2
|
@ -131,20 +131,15 @@ impl Config {
|
|||
}
|
||||
}
|
||||
if let Some(section) = ini.section(Some("cli.colors")) {
|
||||
if let Some(default_color) = section
|
||||
.get("default_color")
|
||||
.and_then(|v| Color::try_from(v).ok())
|
||||
{
|
||||
if let Some(default_color) = section.get("default_color").map(Color::from) {
|
||||
self.cli.color.default_color = default_color;
|
||||
}
|
||||
for (key, value) in section.iter() {
|
||||
if key.starts_with("section_") {
|
||||
if let (sysctl_section, Some(color)) = (
|
||||
self.cli.color.section_colors.insert(
|
||||
Section::from(key.trim_start_matches("section_").to_string()),
|
||||
Color::try_from(value).ok(),
|
||||
) {
|
||||
self.cli.color.section_colors.insert(sysctl_section, color);
|
||||
}
|
||||
Color::from(value),
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue