1
0
Fork 0
mirror of https://github.com/Zedfrigg/ironbar.git synced 2025-07-02 19:21:03 +02:00

refactor: fix a couple of clippy warnings

This commit is contained in:
Jake Stanger 2022-08-15 21:11:17 +01:00
parent 8576ac5c44
commit 7625635050
No known key found for this signature in database
GPG key ID: C51FC8F9CB0BEA61
4 changed files with 29 additions and 23 deletions

View file

@ -48,22 +48,25 @@ async fn main() {
.expect("GTK monitor output differs from Sway's")
.name;
if let Some(ref config) = config.monitors {
let config = config.get(monitor_name);
match &config {
Some(MonitorConfig::Single(config)) => {
create_bar(app, &monitor, monitor_name, config.clone());
}
Some(MonitorConfig::Multiple(configs)) => {
for config in configs {
config.monitors.as_ref().map_or_else(
|| {
create_bar(app, &monitor, monitor_name, config.clone());
},
|config| {
let config = config.get(monitor_name);
match &config {
Some(MonitorConfig::Single(config)) => {
create_bar(app, &monitor, monitor_name, config.clone());
}
Some(MonitorConfig::Multiple(configs)) => {
for config in configs {
create_bar(app, &monitor, monitor_name, config.clone());
}
}
_ => {}
}
_ => {}
}
} else {
create_bar(app, &monitor, monitor_name, config.clone());
}
},
)
}
let style_path = config_dir()