diff --git a/window/src/os/macos/window.rs b/window/src/os/macos/window.rs index 316968ccec0..133dee1312d 100644 --- a/window/src/os/macos/window.rs +++ b/window/src/os/macos/window.rs @@ -678,7 +678,7 @@ impl HasDisplayHandle for Window { impl HasWindowHandle for Window { fn window_handle(&self) -> Result { - let mut handle = + let handle = AppKitWindowHandle::new(NonNull::new(self.ns_view as *mut _).expect("non-null")); unsafe { Ok(WindowHandle::borrow_raw(RawWindowHandle::AppKit(handle))) } }