Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
youyuanwu committed May 27, 2024
1 parent 4bb2d27 commit f3439fa
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/sys/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down
2 changes: 1 addition & 1 deletion src/winhttp/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
Expand Down

0 comments on commit f3439fa

Please sign in to comment.