enforce stricter lints, drop discarded results properly

This commit is contained in:
2026-09-21 00:40:51 +03:00
parent 95d168d5d8
commit 1332600148
12 changed files with 204 additions and 171 deletions
+2 -2
View File
@@ -53,7 +53,7 @@ pub fn start() -> ClickRecorder {
while running_clone.load(Ordering::Relaxed) {
for (i, &(vk, button)) in buttons.iter().enumerate() {
let state = unsafe { GetAsyncKeyState(vk) };
let pressed = (state as u16 & 0x8000) != 0;
let pressed = (state.cast_unsigned() & 0x8000) != 0;
if pressed && !last_pressed[i] {
let mut pt = POINT::default();
if unsafe { GetCursorPos(&mut pt) }.is_ok() {
@@ -85,7 +85,7 @@ impl ClickRecorder {
pub fn stop(mut self) -> Vec<Click> {
self.running.store(false, Ordering::Relaxed);
if let Some(t) = self.thread.take() {
let _ = t.join();
drop(t.join());
}
self.clicks
.lock()