From 20ba62870e772328fa63f919c37b1e9182ee6d87 Mon Sep 17 00:00:00 2001 From: fufesou Date: Thu, 5 Jan 2023 17:52:57 +0800 Subject: [PATCH] remove unimplemented! Signed-off-by: fufesou --- libs/enigo/src/win/win_impl.rs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/libs/enigo/src/win/win_impl.rs b/libs/enigo/src/win/win_impl.rs index 1b2a3f78e..fb3b9881f 100644 --- a/libs/enigo/src/win/win_impl.rs +++ b/libs/enigo/src/win/win_impl.rs @@ -136,7 +136,10 @@ impl MouseControllable for Enigo { MouseButton::Right => MOUSEEVENTF_RIGHTDOWN, MouseButton::Back => MOUSEEVENTF_XDOWN, MouseButton::Forward => MOUSEEVENTF_XDOWN, - _ => unimplemented!(), + _ => { + log::info!("Unsupported button {:?}", button); + return Ok(()); + } }, match button { MouseButton::Back => XBUTTON1 as _, @@ -163,7 +166,10 @@ impl MouseControllable for Enigo { MouseButton::Right => MOUSEEVENTF_RIGHTUP, MouseButton::Back => MOUSEEVENTF_XUP, MouseButton::Forward => MOUSEEVENTF_XUP, - _ => unimplemented!(), + _ => { + log::info!("Unsupported button {:?}", button); + return; + } }, match button { MouseButton::Back => XBUTTON1 as _,