Skip to content

Commit 19416e8

Browse files
committed
style: fix rustfmt formatting
1 parent 3caef5e commit 19416e8

2 files changed

Lines changed: 18 additions & 9 deletions

File tree

src/icons.rs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,7 @@
11
use anyhow::Result;
22
use windows::core::w;
33
use windows::Win32::Foundation::HWND;
4-
use windows::Win32::UI::WindowsAndMessaging::{
5-
FindWindowW, SendMessageTimeoutW, SMTO_ABORTIFHUNG,
6-
};
4+
use windows::Win32::UI::WindowsAndMessaging::{FindWindowW, SendMessageTimeoutW, SMTO_ABORTIFHUNG};
75

86
const WM_COMMAND: u32 = 0x0111;
97
const SHCMD_TOGGLE_DESKTOP_ICONS: u32 = 0x7402;
@@ -90,8 +88,7 @@ pub fn are_icons_visible() -> bool {
9088
return true;
9189
}
9290

93-
let visible =
94-
windows::Win32::UI::WindowsAndMessaging::IsWindowVisible(listview).as_bool();
91+
let visible = windows::Win32::UI::WindowsAndMessaging::IsWindowVisible(listview).as_bool();
9592
crate::dlog!("are_icons_visible: SysListView32 visible = {visible}");
9693
visible
9794
}

src/taskbar.rs

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,8 +60,14 @@ pub fn is_taskbar_visible() -> bool {
6060
/// Hide the taskbar (main + all secondary monitors).
6161
pub fn hide_taskbar() -> Result<()> {
6262
let primary = get_taskbar();
63-
crate::dlog!("hide_taskbar: primary HWND is null = {}", primary.0.is_null());
64-
anyhow::ensure!(!primary.0.is_null(), "Could not find taskbar window (Shell_TrayWnd)");
63+
crate::dlog!(
64+
"hide_taskbar: primary HWND is null = {}",
65+
primary.0.is_null()
66+
);
67+
anyhow::ensure!(
68+
!primary.0.is_null(),
69+
"Could not find taskbar window (Shell_TrayWnd)"
70+
);
6571

6672
unsafe {
6773
let r = ShowWindow(primary, SW_HIDE);
@@ -76,8 +82,14 @@ pub fn hide_taskbar() -> Result<()> {
7682
/// Show the taskbar (main + all secondary monitors).
7783
pub fn show_taskbar() -> Result<()> {
7884
let primary = get_taskbar();
79-
crate::dlog!("show_taskbar: primary HWND is null = {}", primary.0.is_null());
80-
anyhow::ensure!(!primary.0.is_null(), "Could not find taskbar window (Shell_TrayWnd)");
85+
crate::dlog!(
86+
"show_taskbar: primary HWND is null = {}",
87+
primary.0.is_null()
88+
);
89+
anyhow::ensure!(
90+
!primary.0.is_null(),
91+
"Could not find taskbar window (Shell_TrayWnd)"
92+
);
8193

8294
unsafe {
8395
let r = ShowWindow(primary, SW_SHOW);

0 commit comments

Comments
 (0)