Skip to content

Commit

Permalink
Suppress new clippy lint that seems impossible to fix in this case
Browse files Browse the repository at this point in the history
  • Loading branch information
mwcampbell committed Aug 24, 2023
1 parent 2107b39 commit 6eeaa8f
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions platforms/windows/src/subclass.rs
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ impl SubclassImpl {
.unwrap();
let result =
unsafe { SetWindowLongPtrW(self.hwnd, GWLP_WNDPROC, wnd_proc as *const c_void as _) };
#[allow(clippy::unnecessary_literal_unwrap)]
if result == 0 {
let result: Result<()> = Err(Error::from_win32());
result.unwrap();
Expand All @@ -124,6 +125,7 @@ impl SubclassImpl {
transmute::<WNDPROC, LongPtr>(self.prev_wnd_proc),
)
};
#[allow(clippy::unnecessary_literal_unwrap)]
if result == 0 {
let result: Result<()> = Err(Error::from_win32());
result.unwrap();
Expand Down

0 comments on commit 6eeaa8f

Please sign in to comment.