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:
parent
8576ac5c44
commit
7625635050
4 changed files with 29 additions and 23 deletions
29
src/main.rs
29
src/main.rs
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue