From bd5bdf5af548304958663d593fccb454afa6c8ff Mon Sep 17 00:00:00 2001 From: Jake Stanger Date: Sat, 15 Oct 2022 15:36:23 +0100 Subject: [PATCH] fix: logging for creating bar incorrect --- src/main.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.rs b/src/main.rs index 108013db..d5008abb 100644 --- a/src/main.rs +++ b/src/main.rs @@ -116,12 +116,10 @@ fn create_bars( let num_monitors = display.n_monitors(); for i in 0..num_monitors { - let monitor = display.monitor(i).ok_or_else(|| Report::msg("GTK and Sway are reporting a different number of outputs - this is a severe bug and should never happen"))?; + let monitor = display.monitor(i).ok_or_else(|| Report::msg("GTK and Sway are reporting a different set of outputs - this is a severe bug and should never happen"))?; let output = outputs.get(i as usize).ok_or_else(|| Report::msg("GTK and Sway are reporting a different set of outputs - this is a severe bug and should never happen"))?; let monitor_name = &output.name; - info!("Creating bar on '{}'", monitor_name); - // TODO: Could we use an Arc or `Cow` here to avoid cloning? config.monitors.as_ref().map_or_else( || create_bar(app, &monitor, monitor_name, config.clone()), @@ -129,10 +127,12 @@ fn create_bars( let config = config.get(monitor_name); match &config { Some(MonitorConfig::Single(config)) => { + info!("Creating bar on '{}'", monitor_name); create_bar(app, &monitor, monitor_name, config.clone()) } Some(MonitorConfig::Multiple(configs)) => { for config in configs { + info!("Creating bar on '{}'", monitor_name); create_bar(app, &monitor, monitor_name, config.clone())?; }