Skip to content

Commit 648c7bc

Browse files
format Rust
1 parent 73065f7 commit 648c7bc

2 files changed

Lines changed: 5 additions & 6 deletions

File tree

crates/cursor-info/src/windows.rs

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -156,18 +156,17 @@ impl CursorShapeWindows {
156156
#[cfg(target_os = "windows")]
157157
mod windows {
158158
use super::*;
159-
use std::{collections::HashMap, sync::OnceLock};
160159
use ::windows::{
161160
Win32::UI::WindowsAndMessaging::{
162-
IDC_APPSTARTING, IDC_ARROW, IDC_CROSS, IDC_HAND, IDC_HELP, IDC_IBEAM, IDC_NO,
161+
HCURSOR, IDC_APPSTARTING, IDC_ARROW, IDC_CROSS, IDC_HAND, IDC_HELP, IDC_IBEAM, IDC_NO,
163162
IDC_PERSON, IDC_PIN, IDC_SIZEALL, IDC_SIZENESW, IDC_SIZENS, IDC_SIZENWSE, IDC_SIZEWE,
164-
IDC_UPARROW, IDC_WAIT, LoadCursorW, HCURSOR,
163+
IDC_UPARROW, IDC_WAIT, LoadCursorW,
165164
},
166165
core::PCWSTR,
167166
};
167+
use std::{collections::HashMap, sync::OnceLock};
168168

169-
static CURSOR_CACHE: OnceLock<HashMap<usize, CursorShapeWindows>> =
170-
OnceLock::new();
169+
static CURSOR_CACHE: OnceLock<HashMap<usize, CursorShapeWindows>> = OnceLock::new();
171170

172171
fn get_cursor_cache() -> &'static HashMap<usize, CursorShapeWindows> {
173172
CURSOR_CACHE.get_or_init(|| {

crates/recording/src/cursor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -581,7 +581,7 @@ fn get_cursor_data() -> Option<CursorData> {
581581
Some(CursorData {
582582
image: png_data,
583583
hotspot: XY::new(hotspot_x, hotspot_y),
584-
shape: CursorShape::try_from(&cursor_info.hCursor).ok()
584+
shape: CursorShape::try_from(&cursor_info.hCursor).ok(),
585585
})
586586
}
587587
}

0 commit comments

Comments
 (0)