chore: use expect instead of unwrap
parent
6376ecf4ac
commit
a9673837a0
|
@ -123,7 +123,7 @@ pub fn stop() -> Result<(), Error> {
|
||||||
|
|
||||||
// This is executed in another thread!
|
// This is executed in another thread!
|
||||||
extern "system" fn hook_callback(code: i32, wparam: usize, lparam: isize) -> isize {
|
extern "system" fn hook_callback(code: i32, wparam: usize, lparam: isize) -> isize {
|
||||||
let processed_hook_id: HHOOK = unsafe { HOOK_ID.unwrap() };
|
let processed_hook_id: HHOOK = unsafe { HOOK_ID.expect("HOOK_ID is None") };
|
||||||
|
|
||||||
if code < 0 {
|
if code < 0 {
|
||||||
// Don't do anything, just return
|
// Don't do anything, just return
|
||||||
|
|
Reference in New Issue