enforce stricter lints, drop discarded results properly
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user