Update and rename rust.yml to push.yml #1
Annotations
2 warnings
this `else { if .. }` block can be collapsed:
src/main.rs#L168
warning: this `else { if .. }` block can be collapsed
--> src/pages/panel.rs:168:24
|
168 | } else {
| ________________________^
169 | | if let Some(i) = self
170 | | .cosmic_panel_config
171 | | .entries
... |
185 | | }
186 | | }
| |_________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_else_if
= note: `#[warn(clippy::collapsible_else_if)]` on by default
help: collapse nested if block
|
168 ~ } else if let Some(i) = self
169 + .cosmic_panel_config
170 + .entries
171 + .iter()
172 + .position(|e| e == "Panel")
173 + {
174 + let mut entries = self.cosmic_panel_config.entries.clone();
175 + entries.remove(i);
176 + if let Some(helper) = &self.cosmic_panel_config_helper {
177 + let update = self.cosmic_panel_config.set_entries(helper, entries);
178 + if let Err(err) = update {
179 + eprintln!("Error updating cosmic panel entries: {}", err);
180 + } else {
181 + self.show_panel = true;
182 + }
183 + }
184 + }
|
|
1 warning emitted
warning: 1 warning emitted
|