Stick to top part.3 #104
reviewdog [clippy] report
reported by reviewdog 🐶
Findings (0)
Filtered Findings (2)
src/ui/panel/setting.rs|47 col 6| error: this if
statement can be collapsed
--> src/ui/panel/setting.rs:47:6
|
47 | / if ui
48 | | .add(widget::toggle(&mut ctx.components.setting.general.hide_on_lost_focus))
49 | | .changed()
50 | | {
... |
55 | | }
56 | | }
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
note: the lint level is defined here
--> src/main.rs:5:9
|
5 | #![deny(clippy::all, missing_docs, unused_crate_dependencies)]
| ^^^^^^^^^^^
= note: #[deny(clippy::collapsible_if)]
implied by #[deny(clippy::all)]
help: collapse nested if block
|
47 ~ if ui
48 ~ .add(widget::toggle(&mut ctx.components.setting.general.hide_on_lost_focus))
49 ~ .changed() && ctx.components.setting.general.hide_on_lost_focus {
50 ~ ctx.components.setting.general.stick_to_top = false;
51 +
52 ~ ctx.components.os.unstick_to_top();
53 ~ }
|
src/ui/panel/setting.rs|47 col 6| error: this if
statement can be collapsed
--> src/ui/panel/setting.rs:47:6
|
47 | / if ui
48 | | .add(widget::toggle(&mut ctx.components.setting.general.hide_on_lost_focus))
49 | | .changed()
50 | | {
... |
55 | | }
56 | | }
| |^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
note: the lint level is defined here
--> src/main.rs:5:9
|
5 | #![deny(clippy::all, missing_docs, unused_crate_dependencies)]
| ^^^^^^^^^^^
= note: #[deny(clippy::collapsible_if)]
implied by #[deny(clippy::all)]
help: collapse nested if block
|
47 ~ if ui
48 ~ .add(widget::toggle(&mut ctx.components.setting.general.hide_on_lost_focus))
49 ~ .changed() && ctx.components.setting.general.hide_on_lost_focus {
50 ~ ctx.components.setting.general.stick_to_top = false;
51 +
52 ~ ctx.components.os.unstick_to_top();
53 ~ }
|