From f3439faae1efb206b74120cd93cbf25dd53c7cc8 Mon Sep 17 00:00:00 2001 From: Youyuan Wu Date: Mon, 27 May 2024 14:57:18 -0700 Subject: [PATCH] fix clippy --- src/sys/event.rs | 2 +- src/winhttp/mod.rs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/sys/event.rs b/src/sys/event.rs index d4242b2..f4b83dc 100644 --- a/src/sys/event.rs +++ b/src/sys/event.rs @@ -61,7 +61,7 @@ impl Drop for ManualResetEvent { return; } let ok = unsafe { CloseHandle(self.h) }; - if !ok.is_err() { + if ok.is_ok() { let e = Error::from_win32(); assert!(e.code().is_ok(), "Error: {}", e); } diff --git a/src/winhttp/mod.rs b/src/winhttp/mod.rs index 59d8bc8..91d65c3 100644 --- a/src/winhttp/mod.rs +++ b/src/winhttp/mod.rs @@ -269,7 +269,7 @@ impl Drop for HInternet { return; } let ok = unsafe { WinHttpCloseHandle(self.handle) }; - if !ok.is_err() { + if ok.is_ok() { let e = Error::from_win32(); assert!(e.code().is_ok(), "Error: {}", e); }